ComparisonFailure
extends RuntimeException
in package
Thrown when an assertion for string equality failed.
Table of Contents
Properties
- $actual : mixed
- Actually retrieved value which does not match $expected.
- $actualAsString : string
- The string representation of the actual value.
- $expected : mixed
- Expected value of the retrieval which does not match $actual.
- $expectedAsString : string
- The string representation of the expected value.
- $identical : bool
- $message : string
- Optional message which is placed in front of the first line returned by toString().
Methods
- __construct() : mixed
- Initialises with the expected value and the actual value.
- getActual() : mixed
- getActualAsString() : string
- getDiff() : string
- getExpected() : mixed
- getExpectedAsString() : string
- toString() : string
Properties
$actual
Actually retrieved value which does not match $expected.
protected
mixed
$actual
$actualAsString
The string representation of the actual value.
protected
string
$actualAsString
$expected
Expected value of the retrieval which does not match $actual.
protected
mixed
$expected
$expectedAsString
The string representation of the expected value.
protected
string
$expectedAsString
$identical
protected
bool
$identical
$message
Optional message which is placed in front of the first line returned by toString().
protected
string
$message
Methods
__construct()
Initialises with the expected value and the actual value.
public
__construct(mixed $expected, mixed $actual, string $expectedAsString, string $actualAsString[, bool $identical = false ][, string $message = '' ]) : mixed
Parameters
- $expected : mixed
-
expected value retrieved
- $actual : mixed
-
actual value retrieved
- $expectedAsString : string
- $actualAsString : string
- $identical : bool = false
- $message : string = ''
-
a string which is prefixed on all returned lines in the difference output
getActual()
public
getActual() : mixed
getActualAsString()
public
getActualAsString() : string
Return values
stringgetDiff()
public
getDiff() : string
Return values
stringgetExpected()
public
getExpected() : mixed
getExpectedAsString()
public
getExpectedAsString() : string
Return values
stringtoString()
public
toString() : string