AnimeHaxor

Retro-NulledTeam
Staff member
Moderator
Registered
Local time
1:17 PM
Joined
Nov 22, 2015
Messages
6,504
Reaction score
42,921
Points
113
Website
www.nullscripts.net
Site Script
XenForo
AnimeHaxor submitted a new resource:

Unit testing XenForo addons - tutorial - Learn how to unit test your XenForo addons to make them more robust and error-free

1. Introduction

Unit testing is a process by which individual components (units) of your software are tested. The objective is to isolate a section of code and validate its correctness - ensure that it behaves as expected for the given inputs.

There are multiple levels of testing typically used in software development, including Unit testing, Integration testing, System testing, Acceptance testing and so on. Unit testing is generally the lowest level of testing performed and the...

Read more about this resource...
 

AnimeHaxor

Retro-NulledTeam
Staff member
Moderator
Registered
Local time
1:17 PM
Joined
Nov 22, 2015
Messages
6,504
Reaction score
42,921
Points
113
Website
www.nullscripts.net
Site Script
XenForo
AnimeHaxor updated Unit testing XenForo addons - tutorial with a new update entry:

v1.1.0 update

  • Feature: added new functionality to Interacts with Extension
    • isolateAddon
  • Feature: Interacts with Registry - adds:
    • fakesRegistry
  • Feature: Interacts with Filesystem - adds:
    • swapFs
    • mockFs
  • bugfix: after mocking the database, set up the entity manager again, so we get the mocked database
  • bugfix: should pass options array through to parent
  • bugfix: cleaned up function visibility for consistency
  • bugfix: override...

Read the rest of this update entry...
 
  • Like
Reactions: JohanVandaele

AnimeHaxor

Retro-NulledTeam
Staff member
Moderator
Registered
Local time
1:17 PM
Joined
Nov 22, 2015
Messages
6,504
Reaction score
42,921
Points
113
Website
www.nullscripts.net
Site Script
XenForo
AnimeHaxor updated Unit testing XenForo addons - tutorial with a new update entry:

v1.2.0 updates

  • Feature: added new functionality to Interacts with Container
    • mockService
  • Feature: Interacts with Http, new function:
    • fakesHttp

mockService
Mock a service factory builder in the container.

Parameters
  • shortName - the short name of the service class to be mocked
  • mock - optional - the mock closure to define expectations on
Example:
PHP:
<?php namespace Tests\Unit;

use Tests\TestCase;
use...

Read the rest of this update entry...
 
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock