PHP Класс kahlan\Specification

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

Защищенные свойства (Protected)

Свойство Тип Описание
$_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