PHP Класс PhpBench\Tests\Unit\Util\TimeUnitTest

Наследование: extends PHPUnit_Framework_TestCase
Показать файл Открыть проект

Открытые методы

Метод Описание
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).

Описание методов

provideConvert() публичный Метод

public provideConvert ( )

provideConvertThroughput() публичный Метод

testConvert() публичный Метод

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

testConvertThroughput() публичный Метод

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

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.
public testFormat ( )

testGivenValuesModeAndDestUnit() публичный Метод

It should use the given values for getDestUnit and getMode.

testInvalidDestFormat() публичный Метод

testInvalidSourceFormat() публичный Метод

testInvalidUnitType() публичный Метод

public 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).