PHP Class Tester, atk4

Afficher le fichier Open project: atk4/atk4 Class Usage Examples

Méthodes publiques

Свойство Type Description
$results Model Contains model with test results.
$single_test_only If set, it will run only a single test, useful for isolated testing.

Méthodes publiques

Méthode Description
_add ( $class ) Similar to a regular Agile Toolkit add method, however will will return a "wrapper" object of a specified class. This wrapper will automatically intercept all method calls of a host object and send it to $debug.
debug ( $text ) Outputs some debug information, which is cached until the end of current test. If any of the assertions fail, this will also output debug information.
disableAsserts ( ) Restores previous setting of assert() method.
enableAsserts ( ) Configures PHP assert() method to use internal callback for error reporting.
info ( $text ) Force output of the text which will appear while the tests are being executed. This is useful if your test takes some time to perform and you would want to have some output on the console.
init ( )
prepareForTest ( $test )
setState ( $state ) Sets the state of your application.
skip ( )
verifyState ( $state ) Verifies that the state of your application matches selected.

Method Details

_add() public méthode

Similar to a regular Agile Toolkit add method, however will will return a "wrapper" object of a specified class. This wrapper will automatically intercept all method calls of a host object and send it to $debug.
public _add ( $class )

debug() public méthode

Outputs some debug information, which is cached until the end of current test. If any of the assertions fail, this will also output debug information.
public debug ( $text )

disableAsserts() public méthode

Restores previous setting of assert() method.
public disableAsserts ( )

enableAsserts() public méthode

Configures PHP assert() method to use internal callback for error reporting.
public enableAsserts ( )

info() public méthode

Force output of the text which will appear while the tests are being executed. This is useful if your test takes some time to perform and you would want to have some output on the console.
public info ( $text )

init() public méthode

public init ( )

prepareForTest() public méthode

public prepareForTest ( $test )

setState() public méthode

Sets the state of your application.
public setState ( $state )

skip() public méthode

public skip ( )

verifyState() public méthode

Verifies that the state of your application matches selected.
public verifyState ( $state )

Property Details

$results public_oe property

Contains model with test results.
public Model $results
Résultat Model

$single_test_only public_oe property

If set, it will run only a single test, useful for isolated testing.
public $single_test_only