PHP Class phpmock\functions\FixedMicrotimeFunctionTest

See also: FixedMicrotimeFunction
Author: Markus Malkusch ([email protected])
Inheritance: extends PHPUnit_Framework_TestCase
Show file Open project: php-mock/php-mock

Public Methods

Method Description
provideTestConstruct ( ) : array Provides test cases for testConstruct().
provideTestConstructFailsForInvalidArgument ( ) : array Returns test cases for testConstructFailsForInvalidArgument()
testConstruct ( mixed $timestamp, float $expected ) Tests initializing with a timestamp.
testConstructCurrentTime ( ) Tests initializing with the current timestamp
testConstructFailsForInvalidArgument ( $timestamp ) Tests exception for invalid argument in constructor.
testGetCallable ( ) Tests getCallable()
testGetMicrotime ( ) Tests getMicrotime().
testSetMicrotime ( ) Tests setMicrotime().
testSetMicrotimeAsFloat ( ) Tests setMicrotimeAsFloat().

Method Details

provideTestConstruct() public method

Provides test cases for testConstruct().
public provideTestConstruct ( ) : array
return array

provideTestConstructFailsForInvalidArgument() public method

Returns test cases for testConstructFailsForInvalidArgument()
public provideTestConstructFailsForInvalidArgument ( ) : array
return array Test cases.

testConstruct() public method

Tests initializing with a timestamp.
public testConstruct ( mixed $timestamp, float $expected )
$timestamp mixed The tested timestamp.
$expected float The expected timestamp.

testConstructCurrentTime() public method

Tests initializing with the current timestamp

testConstructFailsForInvalidArgument() public method

Tests exception for invalid argument in constructor.
public testConstructFailsForInvalidArgument ( $timestamp )

testGetCallable() public method

Tests getCallable()
public testGetCallable ( )

testGetMicrotime() public method

Tests getMicrotime().
public testGetMicrotime ( )

testSetMicrotime() public method

Tests setMicrotime().
public testSetMicrotime ( )

testSetMicrotimeAsFloat() public method

Tests setMicrotimeAsFloat().