PHP 클래스 Tester, atk4

파일 보기 프로젝트 열기: atk4/atk4 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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