phpmock\functions\IncrementableTest::provideTestIncrement PHP Method

provideTestIncrement() public method

Test cases for testIncrement().
public provideTestIncrement ( ) : array
return array Test cases.
    public function provideTestIncrement()
    {
        $getFixedValue = function (FixedValueFunction $function) {
            return call_user_func($function->getCallable());
        };
        $getMicrotime = function (FixedMicrotimeFunction $function) {
            return $function->getMicrotime(true);
        };
        $getDate = function (FixedDateFunction $function) {
            return call_user_func($function->getCallable(), "U");
        };
        return [[1, 1, new FixedValueFunction(0), $getFixedValue], [2, 1, new FixedValueFunction(1), $getFixedValue], [-1, -1, new FixedValueFunction(0), $getFixedValue], [1, 1, new FixedMicrotimeFunction(0), $getMicrotime], [-1, -1, new FixedMicrotimeFunction(0), $getMicrotime], [2, 1, new FixedMicrotimeFunction(1), $getMicrotime], [1, 1, new FixedDateFunction(0), $getDate], [-1, -1, new FixedDateFunction(0), $getDate], [2, 1, new FixedDateFunction(1), $getDate], [1.00000001, 1.0E-8, new FixedMicrotimeFunction(1), $getMicrotime], [1.00000009, 9.0E-8, new FixedMicrotimeFunction(1), $getMicrotime]];
    }