PHP Класс Tester, atk4

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$results Model Contains model with test results.
$single_test_only If set, it will run only a single test, useful for isolated testing.

Открытые методы

Метод Описание
_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.

Описание методов

_add() публичный Метод

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() публичный Метод

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() публичный Метод

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

enableAsserts() публичный Метод

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

info() публичный Метод

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 init ( )

prepareForTest() публичный Метод

public prepareForTest ( $test )

setState() публичный Метод

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

skip() публичный Метод

public skip ( )

verifyState() публичный Метод

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

Описание свойств

$results публичное свойство

Contains model with test results.
public Model $results
Результат Model

$single_test_only публичное свойство

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