Documentation

DateTimeComparator extends ObjectComparator
in package

FinalYes

Arrays are equal if they contain the same key-value pairs.

The order of the keys does not matter. The types of key-value pairs do not matter.

Table of Contents

Properties

$factory  : Factory

Methods

accepts()  : bool
assertEquals()  : void
setFactory()  : void
factory()  : Factory
toArray()  : array<string|int, mixed>
dateTimeToString()  : string
Returns an ISO 8601 formatted string representation of a datetime or 'Invalid DateTimeInterface object' if the provided DateTimeInterface was not properly initialized.
indent()  : string

Properties

Methods

accepts()

public accepts(mixed $expected, mixed $actual) : bool
Parameters
$expected : mixed
$actual : mixed
Return values
bool

assertEquals()

public assertEquals(mixed $expected, mixed $actual[, float $delta = 0.0 ][, bool $canonicalize = false ][, bool $ignoreCase = false ][, array<string|int, mixed> &$processed = [] ]) : void
Parameters
$expected : mixed
$actual : mixed
$delta : float = 0.0
$canonicalize : bool = false
$ignoreCase : bool = false
$processed : array<string|int, mixed> = []
Tags
throws
ComparisonFailure

toArray()

protected toArray(object $object) : array<string|int, mixed>
Parameters
$object : object
Return values
array<string|int, mixed>

dateTimeToString()

Returns an ISO 8601 formatted string representation of a datetime or 'Invalid DateTimeInterface object' if the provided DateTimeInterface was not properly initialized.

private dateTimeToString(DateTimeInterface $datetime) : string
Parameters
$datetime : DateTimeInterface
Return values
string

indent()

private indent(string $lines) : string
Parameters
$lines : string
Return values
string

        
On this page

Search results