Documentation

ClockMock
in package

Tags
author

Nicolas Grekas p@tchwork.com

author

Dominic Tubach dominic.tubach@to.com

Table of Contents

Properties

$now  : mixed

Methods

date()  : string
gmdate()  : string
hrtime()  : array<string|int, mixed>|int|float
microtime()  : mixed
register()  : void
sleep()  : int
time()  : int
usleep()  : void
withClockMock()  : bool|null

Properties

Methods

date()

public static date(mixed $format[, mixed $timestamp = null ]) : string
Parameters
$format : mixed
$timestamp : mixed = null
Return values
string

gmdate()

public static gmdate(mixed $format[, mixed $timestamp = null ]) : string
Parameters
$format : mixed
$timestamp : mixed = null
Return values
string

hrtime()

public static hrtime([mixed $asNumber = false ]) : array<string|int, mixed>|int|float
Parameters
$asNumber : mixed = false
Return values
array<string|int, mixed>|int|float

microtime()

public static microtime([mixed $asFloat = false ]) : mixed
Parameters
$asFloat : mixed = false

register()

public static register(mixed $class) : void
Parameters
$class : mixed

sleep()

public static sleep(mixed $s) : int
Parameters
$s : mixed
Return values
int

time()

public static time() : int
Return values
int

usleep()

public static usleep(mixed $us) : void
Parameters
$us : mixed

withClockMock()

public static withClockMock([mixed $enable = null ]) : bool|null
Parameters
$enable : mixed = null
Return values
bool|null

        
On this page

Search results