PHP Класс Peridot\Core\Test

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

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

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