PHP 클래스 Peridot\Core\Test

상속: extends Peridot\Core\AbstractTest
파일 보기 프로젝트 열기: peridot-php/peridot 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $description, callable $definition = null )
run ( Peridot\Core\TestResult $result ) : void Execute the test along with any setup and tear down functions.

보호된 메소드들

메소드 설명
executeTest ( Peridot\Core\TestResult $result ) Attempt to execute setup functions and run the test definition
failIfPassing ( array &$action, mixed $error ) Fail the test, but do not overwrite existing failures
handleErrors ( Peridot\Core\TestResult $result, array &$action ) : callable | null Set an error handler to handle errors within the test
restoreErrorHandler ( callable | null $handler ) Restore the previous error handler
runSetup ( ) Excecute the test's setup functions
runTearDown ( Peridot\Core\TestResult $result, array $action ) Run the tests tear down methods and have the result perform the method indicated by $action

메소드 상세

__construct() 공개 메소드

public __construct ( string $description, callable $definition = null )
$description string
$definition callable

executeTest() 보호된 메소드

Attempt to execute setup functions and run the test definition
protected executeTest ( Peridot\Core\TestResult $result )
$result Peridot\Core\TestResult

failIfPassing() 보호된 메소드

Fail the test, but do not overwrite existing failures
protected failIfPassing ( array &$action, mixed $error )
$action array
$error mixed

handleErrors() 보호된 메소드

Set an error handler to handle errors within the test
protected handleErrors ( Peridot\Core\TestResult $result, array &$action ) : callable | null
$result Peridot\Core\TestResult
$action array
리턴 callable | null

restoreErrorHandler() 보호된 메소드

Restore the previous error handler
protected restoreErrorHandler ( callable | null $handler )
$handler callable | null

run() 공개 메소드

Execute the test along with any setup and tear down functions.
public run ( Peridot\Core\TestResult $result ) : void
$result Peridot\Core\TestResult
리턴 void

runSetup() 보호된 메소드

Excecute the test's setup functions
protected runSetup ( )

runTearDown() 보호된 메소드

Run the tests tear down methods and have the result perform the method indicated by $action
protected runTearDown ( Peridot\Core\TestResult $result, array $action )
$result Peridot\Core\TestResult
$action array