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
파일 보기 프로젝트 열기: jyxo/php

공개 메소드들

메소드 설명
__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