PHP Class ParaTest\Runners\PHPUnit\Runner

Inheritance: extends BaseRunner
Show file Open project: brianium/paratest Class Usage Examples

Protected Properties

Property Type Description
$tokens array A collection of available tokens based on the number of processes specified in $options

Public Methods

Method Description
__construct ( $opts = [] )
run ( ) The money maker. Runs all ExecutableTest objects in separate processes.

Protected Methods

Method Description
acquireToken ( string $tokenIdentifier ) Flag a token as acquired and not available for use
getNextAvailableToken ( ) : boolean | array Gets the next token that is available to be acquired from a finished process
initTokens ( ) Initialize the available test tokens based on how many processes ParaTest will be run in
releaseToken ( string $tokenIdentifier ) Flag a token as available for use

Private Methods

Method Description
addCoverage ( ParaTest\Runners\PHPUnit\ExecutableTest $test )
complete ( ) Finalizes the run process. This method prints all results, rewinds the log interpreter, logs any results to JUnit, and cleans up temporary files
fillRunQueue ( ) This method removes ExecutableTest objects from the pending collection and adds them to the running collection. It is also in charge of recycling and acquiring available test tokens for use
setExitCode ( ParaTest\Runners\PHPUnit\ExecutableTest $test ) If the provided test object has an exit code higher than the currently set exit code, that exit code will be set as the overall exit code
testIsStillRunning ( ParaTest\Runners\PHPUnit\ExecutableTest $test ) : boolean Returns whether or not a test has finished being executed. If it has, this method also halts a test process - optionally throwing an exception if a fatal error has occurred - prints feedback, and updates the overall exit code

Method Details

__construct() public method

public __construct ( $opts = [] )

acquireToken() protected method

Flag a token as acquired and not available for use
protected acquireToken ( string $tokenIdentifier )
$tokenIdentifier string

getNextAvailableToken() protected method

Gets the next token that is available to be acquired from a finished process
protected getNextAvailableToken ( ) : boolean | array
return boolean | array

initTokens() protected method

Initialize the available test tokens based on how many processes ParaTest will be run in
protected initTokens ( )

releaseToken() protected method

Flag a token as available for use
protected releaseToken ( string $tokenIdentifier )
$tokenIdentifier string

run() public method

The money maker. Runs all ExecutableTest objects in separate processes.
public run ( )

Property Details

$tokens protected property

A collection of available tokens based on the number of processes specified in $options
protected array $tokens
return array