Class AbstractSleepFunction
Abstract class for sleep() and usleep() functions.
- phpmock\functions\AbstractSleepFunction implements phpmock\functions\FunctionProvider
Abstract
Namespace: phpmock\functions
License: WTFPL
Author: Markus Malkusch markus@malkusch.de
Link: Donations
Located at functions/AbstractSleepFunction.php
Methods summary
Namespace: phpmock\functions
License: WTFPL
Author: Markus Malkusch markus@malkusch.de
Link: Donations
Located at functions/AbstractSleepFunction.php
public
#
__construct( array $incrementables = [] )
Sets the Incrementable objects.
Sets the Incrementable objects.
Parameters
- $incrementables
- Observing Incrementables.
See
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.
The callable for this object.
Implementation of
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.