PHP Class bandwidthThrottle\tokenBucket\util\DoublePackerTest

See also: DoublePacker
Author: Markus Malkusch ([email protected])
Inheritance: extends PHPUnit_Framework_TestCase
Show file Open project: bandwidth-throttle/token-bucket

Public Methods

Method Description
provideTestPack ( ) : array Provides test cases for testPack().
provideTestUnpack ( ) : array Provides test cases for testConvert().
provideTestUnpackFails ( ) : array Provides test cases for testUnpackFails().
testPack ( string $expected, double $input ) Tests pack().
testUnpack ( double $expected, string $input ) Tests unpack().
testUnpackFails ( string $input ) Tests unpack() fails.

Method Details

provideTestPack() public method

Provides test cases for testPack().
public provideTestPack ( ) : array
return array Test cases.

provideTestUnpack() public method

Provides test cases for testConvert().
public provideTestUnpack ( ) : array
return array Test cases.

provideTestUnpackFails() public method

Provides test cases for testUnpackFails().
public provideTestUnpackFails ( ) : array
return array Test cases.

testPack() public method

Tests pack().
public testPack ( string $expected, double $input )
$expected string The expected string.
$input double The input double.

testUnpack() public method

Tests unpack().
public testUnpack ( double $expected, string $input )
$expected double The expected double.
$input string The input string.

testUnpackFails() public method

Tests unpack() fails.
public testUnpackFails ( string $input )
$input string The input string.