class ExpectationFailedException extends AssertionFailedError (View source)

Exception for expectations which failed their check.

The exception contains the error message and optionally a SebastianBergmann\Comparator\ComparisonFailure which is used to generate diff output of the failed expectations.

Properties

protected array $serializableTrace from Exception
protected $comparisonFailure

Methods

__construct($message, ComparisonFailure $comparisonFailure = null, Exception $previous = null)

No description

array
getSerializableTrace()

Returns the serializable trace (without 'args').

from Exception
string
__toString()

No description

from Exception
__sleep()

No description

from Exception
string
toString()

Wrapper for getMessage() which is declared as final.

null|ComparisonFailure
getComparisonFailure()

No description

Details

__construct($message, ComparisonFailure $comparisonFailure = null, Exception $previous = null)

Parameters

$message
ComparisonFailure $comparisonFailure
Exception $previous

array getSerializableTrace()

Returns the serializable trace (without 'args').

Return Value

array

string __toString()

Return Value

string

__sleep()

string toString()

Wrapper for getMessage() which is declared as final.

Return Value

string

null|ComparisonFailure getComparisonFailure()

Return Value

null|ComparisonFailure