ProphecyComparator
extends ObjectComparator
in package
Compares objects for equality.
Tags
Table of Contents
- $exporter : Exporter
- $factory : Factory
- __construct() : mixed
- accepts() : bool
- Returns whether the comparator can compare two values.
- assertEquals() : void
- Asserts that two values are equal.
- setFactory() : mixed
- indent() : mixed
- toArray() : array<string|int, mixed>
- Converts an object to an array containing all of its private, protected and public properties.
Properties
$exporter
protected
Exporter
$exporter
$factory
protected
Factory
$factory
Methods
__construct()
public
__construct() : mixed
Return values
mixed —accepts()
Returns whether the comparator can compare two values.
public
accepts(mixed $expected, mixed $actual) : bool
Parameters
- $expected : mixed
-
The first value to compare
- $actual : mixed
-
The second value to compare
Return values
bool —assertEquals()
Asserts that two values are equal.
public
assertEquals(mixed $expected, mixed $actual[, mixed $delta = 0.0 ][, mixed $canonicalize = false ][, mixed $ignoreCase = false ][, array<string|int, mixed> &$processed = array() ]) : void
Parameters
- $expected : mixed
-
First value to compare
- $actual : mixed
-
Second value to compare
- $delta : mixed = 0.0
-
Allowed numerical distance between two values to consider them equal
- $canonicalize : mixed = false
-
Arrays are sorted before comparison when set to true
- $ignoreCase : mixed = false
-
Case is ignored when set to true
- $processed : array<string|int, mixed> = array()
-
List of already processed elements (used to prevent infinite recursion)
Return values
void —setFactory()
public
setFactory(Factory $factory) : mixed
Parameters
- $factory : Factory
Return values
mixed —indent()
protected
indent(mixed $lines) : mixed
Parameters
- $lines : mixed
Return values
mixed —toArray()
Converts an object to an array containing all of its private, protected and public properties.
protected
toArray(object $object) : array<string|int, mixed>
Parameters
- $object : object