PHP Class PhpBench\Tests\Unit\Util\TimeUnitTest

Inheritance: extends PHPUnit_Framework_TestCase
Afficher le fichier Open project: dantleech/phpbench

Méthodes publiques

Méthode Description
provideConvert ( )
provideConvertThroughput ( )
testConvert ( $time, $unit, $destUnit, $expectedTime ) It should convertTo one time unit to another.
testConvertThroughput ( $time, $unit, $destUnit, $expectedThroughput ) It should convert one time unit to another in throughput mode.
testDefaultValuesModeAndDestUnit ( ) It should use the default values for mode and dest unit if null values are given.
testDestSuffixDefaultState ( ) It should return the destination suffix for default state.
testDestSuffixGivenState ( ) It should return the destination suffix for a given state.
testFormat ( ) It should format a time into a human readable string.
testGivenValuesModeAndDestUnit ( ) It should use the given values for getDestUnit and getMode.
testInvalidDestFormat ( )
testInvalidSourceFormat ( )
testInvalidUnitType ( )
testOverridePrecision ( ) It should allow the precision to be overriden.
testResolveDestUnitAndModeAndPrecision ( ) It should resolve given values to the overridden values in the case that the values are overridden (dest unit and mode).

Method Details

provideConvert() public méthode

public provideConvert ( )

provideConvertThroughput() public méthode

testConvert() public méthode

It should convertTo one time unit to another.
public testConvert ( $time, $unit, $destUnit, $expectedTime )

testConvertThroughput() public méthode

It should convert one time unit to another in throughput mode.
public testConvertThroughput ( $time, $unit, $destUnit, $expectedThroughput )

testDefaultValuesModeAndDestUnit() public méthode

It should use the default values for mode and dest unit if null values are given.

testDestSuffixDefaultState() public méthode

It should return the destination suffix for default state.

testDestSuffixGivenState() public méthode

It should return the destination suffix for a given state.

testFormat() public méthode

It should format a time into a human readable string.
public testFormat ( )

testGivenValuesModeAndDestUnit() public méthode

It should use the given values for getDestUnit and getMode.

testInvalidDestFormat() public méthode

testInvalidSourceFormat() public méthode

testInvalidUnitType() public méthode

public testInvalidUnitType ( )

testOverridePrecision() public méthode

It should allow the precision to be overriden.

testResolveDestUnitAndModeAndPrecision() public méthode

It should resolve given values to the overridden values in the case that the values are overridden (dest unit and mode).