PHP Класс Jyxo\Beholder\Executor

Includes filtering and HTML output formatting. Tests are performed in random order but results are outputted in alphabetical order with the order they were performed. Example: $beholder = new \Jyxo\Beholder\Executor('Project', $_GET); $beholder->addTest('T1', new \Project\Beholder\Test1('Test 1')); $beholder->addTest('T2', new \Project\Beholder\Test2('Test 2')); $beholder->addTest('T3', new \Project\Beholder\Test3Blah('Test 3 Blah')); $beholder->run();
Автор: Jan Matoušek
Автор: Jaroslav Hanslík
Показать файл Открыть проект

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

Метод Описание
__construct ( string $project, array $params = [] ) Constructor.
addTest ( string $ident, TestCase $test ) : self Adds a test.
getTestsData ( ) : array Returns tests data.
run ( ) : boolean Performs chosen tests and outputs results according to the selected output type.
setParams ( array $params )

Приватные методы

Метод Описание
includeTest ( string $ident ) : boolean Checks if the given test will be performed according to the current filter settings.
patternMatch ( string $pattern, string $string ) : boolean Checks if the given string matches the given pattern.
runTest ( string $ident ) : array Runs a single test.
writeHtml ( boolean $allSucceeded ) Outputs results in HTML form.
writeText ( boolean $allSucceeded ) Outputs results in plaintext.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( string $project, array $params = [] )
$project string Project name
$params array Parameters; possible parameters are: include, exclude, output

addTest() публичный Метод

Adds a test.
public addTest ( string $ident, TestCase $test ) : self
$ident string Tests identifier
$test TestCase Test instance
Результат self

getTestsData() публичный Метод

Returns tests data.
public getTestsData ( ) : array
Результат array

run() публичный Метод

Performs chosen tests and outputs results according to the selected output type.
public run ( ) : boolean
Результат boolean Returns if all tests were successful

setParams() публичный Метод

public setParams ( array $params )
$params array