final 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 list<array{file: string, line: int, function: string}> $serializableTrace from  Exception
protected ComparisonFailure|null $comparisonFailure

Methods

__construct(string $message, ComparisonFailure|null $comparisonFailure = null, Throwable|null $previous = null)

No description

array
__serialize()

No description

array
getSerializableTrace()

Returns the serializable trace (without 'args').

string
toString()

Wrapper for getMessage() which is declared as final.

ComparisonFailure|null
getComparisonFailure()

No description

Details

__construct(string $message, ComparisonFailure|null $comparisonFailure = null, Throwable|null $previous = null)

No description

Parameters

string $message
ComparisonFailure|null $comparisonFailure
Throwable|null $previous

array __serialize()

No description

Return Value

array

array getSerializableTrace()

Returns the serializable trace (without 'args').

Return Value

array

string toString()

Wrapper for getMessage() which is declared as final.

Return Value

string

ComparisonFailure|null getComparisonFailure()

No description

Return Value

ComparisonFailure|null