PHP 클래스 kahlan\Specification

상속: extends Scope
파일 보기 프로젝트 열기: crysalead/kahlan 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_expectations Expectation[] List of expectations.
$_return mixed Store the return value of the spec closure.

공개 메소드들

메소드 설명
__construct ( array $config = [] ) Constructor.
expect ( Expectation $actual, $timeout ) : Expectation[] The expect statement.
logs ( ) : array Returns execution log.
passed ( &$return = null ) : boolean Checks if all test passed.
waitsFor ( Expectation $actual, $timeout ) : mixed The waitsFor statement.

보호된 메소드들

메소드 설명
_execute ( ) Processes the spec.
_process ( ) Processes a child specs.
_specEnd ( $runAfterEach = true ) Spec end helper.
_specStart ( ) Spec start helper.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( array $config = [] )
$config array The Suite config array. Options are: -`'closure'` _Closure_ : the closure of the test. -`'message'` _string_ : the spec message. -`'scope'` _string_ : supported scope are `'normal'` & `'focus'`.

_execute() 보호된 메소드

Processes the spec.
protected _execute ( )

_process() 보호된 메소드

Processes a child specs.
또한 보기: Kahlan\Suite::process()
protected _process ( )

_specEnd() 보호된 메소드

Spec end helper.
protected _specEnd ( $runAfterEach = true )

_specStart() 보호된 메소드

Spec start helper.
protected _specStart ( )

expect() 공개 메소드

The expect statement.
public expect ( Expectation $actual, $timeout ) : Expectation[]
$actual Expectation The expression to check
리턴 Expectation[]

logs() 공개 메소드

Returns execution log.
public logs ( ) : array
리턴 array

passed() 공개 메소드

Checks if all test passed.
public passed ( &$return = null ) : boolean
리턴 boolean Returns `true` if no error occurred, `false` otherwise.

waitsFor() 공개 메소드

The waitsFor statement.
public waitsFor ( Expectation $actual, $timeout ) : mixed
$actual Expectation The expression to check
리턴 mixed

프로퍼티 상세

$_expectations 보호되어 있는 프로퍼티

List of expectations.
protected Expectation[],kahlan $_expectations
리턴 Expectation[]

$_return 보호되어 있는 프로퍼티

Store the return value of the spec closure.
protected mixed $_return
리턴 mixed