ClockMock
in package
Tags
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
$now
private
static mixed
$now
Methods
date()
public
static date(mixed $format[, mixed $timestamp = null ]) : string
Parameters
- $format : mixed
- $timestamp : mixed = null
Return values
stringgmdate()
public
static gmdate(mixed $format[, mixed $timestamp = null ]) : string
Parameters
- $format : mixed
- $timestamp : mixed = null
Return values
stringhrtime()
public
static hrtime([mixed $asNumber = false ]) : array<string|int, mixed>|int|float
Parameters
- $asNumber : mixed = false
Return values
array<string|int, mixed>|int|floatmicrotime()
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
inttime()
public
static time() : int
Return values
intusleep()
public
static usleep(mixed $us) : void
Parameters
- $us : mixed
withClockMock()
public
static withClockMock([mixed $enable = null ]) : bool|null
Parameters
- $enable : mixed = null