PHP Class Peridot\Core\Suite

Inheritance: extends Peridot\Core\AbstractTest
Datei anzeigen Open project: peridot-php/peridot Class Usage Examples

Protected Properties

Property Type Description
$halted boolean Has the suite been halted
$tests array Tests belonging to this suite

Public Methods

Method Description
addTest ( Peridot\Core\TestInterface $test ) Add a test to the suite
define ( ) : void Execute the Suite definition.
getTests ( ) : array Return collection of tests
halt ( ) : void Put the Suite in a halted state. A halted Suite will not run or will stop running if currently running.
run ( Peridot\Core\TestResult $result ) Run all the specs belonging to the suite
setTests ( array $tests ) Set suite tests

Protected Methods

Method Description
runTest ( Peridot\Core\TestInterface $test, Peridot\Core\TestResult $result ) Run a test and track its results.

Method Details

addTest() public method

Add a test to the suite
public addTest ( Peridot\Core\TestInterface $test )
$test Peridot\Core\TestInterface

define() public method

Execute the Suite definition.
public define ( ) : void
return void

getTests() public method

Return collection of tests
public getTests ( ) : array
return array

halt() public method

Put the Suite in a halted state. A halted Suite will not run or will stop running if currently running.
public halt ( ) : void
return void

run() public method

Run all the specs belonging to the suite
public run ( Peridot\Core\TestResult $result )
$result Peridot\Core\TestResult

runTest() protected method

Run a test and track its results.
protected runTest ( Peridot\Core\TestInterface $test, Peridot\Core\TestResult $result )
$test Peridot\Core\TestInterface
$result Peridot\Core\TestResult

setTests() public method

Set suite tests
public setTests ( array $tests )
$tests array

Property Details

$halted protected_oe property

Has the suite been halted
protected bool $halted
return boolean

$tests protected_oe property

Tests belonging to this suite
protected array $tests
return array