PHP Class PhpBench\Tests\Unit\Benchmark\VariantTest

Inheritance: extends PHPUnit_Framework_TestCase
Exibir arquivo Open project: dantleech/phpbench

Public Methods

Method Description
setUp ( )
testComputeDeviationZeroIterations ( ) It should not crash if compute deviations is called with zero variant in the collection.
testComputeStats ( ) It should calculate the stats of each iteration from the mean.
testCreateIteration ( ) It should create new iterations with the correct indexes.
testExceptionAwareness ( ) It should be aware of exceptions.
testExceptionNoneGet ( ) It should return a new ErrorStack if none has not been set.
testGetMetricValues ( ) It should return times and memories.
testGetStatsNoComputeException ( ) It should throw an exception if getStats is called when no computation has taken place.
testGetStatsWithExceptionException ( ) It should throw an exception if getStats is called when an exception has been set.
testIterationSpawn ( ) It should spawn variant.
testReject ( ) It should mark variant as rejected if they deviate too far from the mean.

Private Methods

Method Description
createIteration ( $time, $expectedDeviation = null, $expectedZValue = null )

Method Details

setUp() public method

public setUp ( )

testComputeDeviationZeroIterations() public method

It should not crash if compute deviations is called with zero variant in the collection.

testComputeStats() public method

It should calculate the stats of each iteration from the mean.
public testComputeStats ( )

testCreateIteration() public method

It should create new iterations with the correct indexes.
public testCreateIteration ( )

testExceptionAwareness() public method

It should be aware of exceptions.

testExceptionNoneGet() public method

It should return a new ErrorStack if none has not been set.

testGetMetricValues() public method

It should return times and memories.
public testGetMetricValues ( )

testGetStatsNoComputeException() public method

It should throw an exception if getStats is called when no computation has taken place.

testGetStatsWithExceptionException() public method

It should throw an exception if getStats is called when an exception has been set.

testIterationSpawn() public method

It should be iterable It sohuld be countable.
public testIterationSpawn ( )

testReject() public method

It should mark variant as rejected if they deviate too far from the mean.
public testReject ( )