TestFailure
class TestFailure (View source)
A TestFailure collects a failed test together with the caught exception.
Properties
protected Test|null | $failedTest | ||
protected Throwable | $thrownException |
Methods
Constructs a TestFailure with the given test and exception.
Returns a short description of the failure.
Returns a description for the thrown exception.
Returns the name of the failing test (including data set, if any).
Returns the failing test.
Gets the thrown exception.
Returns the exception's message.
Returns true if the thrown exception is of type AssertionFailedError.
Details
at line 41
__construct(Test $failedTest, Throwable $t)
Constructs a TestFailure with the given test and exception.
at line 61
string
toString()
Returns a short description of the failure.
at line 75
string
getExceptionAsString()
Returns a description for the thrown exception.
at line 119
string
getTestName()
Returns the name of the failing test (including data set, if any).
at line 134
Test|null
failedTest()
Returns the failing test.
Note: The test object is not set when the test is executed in process isolation.
at line 154
string
exceptionMessage()
Returns the exception's message.
at line 165
bool
isFailure()
Returns true if the thrown exception is of type AssertionFailedError.