Overview

Namespaces

  • phpmock
    • environment
    • functions
    • spy

Classes

  • AbstractSleepFunction
  • FixedDateFunction
  • FixedMicrotimeFunction
  • FixedValueFunction
  • SleepFunction
  • UsleepFunction

Interfaces

  • FunctionProvider
  • Incrementable
  • Overview
  • Namespace
  • Class

Class AbstractSleepFunction

Abstract class for sleep() and usleep() functions.

phpmock\functions\AbstractSleepFunction implements phpmock\functions\FunctionProvider

Direct known subclasses

phpmock\functions\SleepFunction, phpmock\functions\UsleepFunction
Abstract
Namespace: phpmock\functions
License: WTFPL
Author: Markus Malkusch markus@malkusch.de
Link: Donations
Located at functions/AbstractSleepFunction.php
Methods summary
public
# __construct( array $incrementables = [] )

Sets the Incrementable objects.

Sets the Incrementable objects.

Parameters

$incrementables
Observing Incrementables.

See

phpmock\functions\AbstractSleepFunction::addIncrementable()
public callable
# getCallable( )

Returns the sleep() mock function.

Returns the sleep() mock function.

A call will increase all registered Increment objects.

Returns

callable
The callable for this object.

Implementation of

phpmock\functions\FunctionProvider::getCallable()
public
# addIncrementable( phpmock\functions\Incrementable $incrementable )

Adds an Incrementable object.

Adds an Incrementable object.

These objects are observing this function and get notified by increasing the amount of passed time. Incrementables are used for time() and microtime() mocks.

Parameters

$incrementable
Observing Incrementable.
API documentation generated by ApiGen