PHPUnit_Framework_TestFailure
in package
A TestFailure collects a failed test together with the caught exception.
Tags
Table of Contents
- $failedTest : PHPUnit_Framework_Test|null
- $thrownException : Exception
- $testName : string
- __construct() : mixed
- Constructs a TestFailure with the given test and exception.
- exceptionMessage() : string
- Returns the exception's message.
- exceptionToString() : string
- Returns a description for an exception.
- failedTest() : PHPUnit_Framework_Test|null
- Returns the failing test.
- getExceptionAsString() : string
- Returns a description for the thrown exception.
- getTestName() : string
- Returns the name of the failing test (including data set, if any).
- isFailure() : bool
- Returns true if the thrown exception is of type AssertionFailedError.
- thrownException() : Exception
- Gets the thrown exception.
- toString() : string
- Returns a short description of the failure.
Properties
$failedTest
protected
PHPUnit_Framework_Test|null
$failedTest
$thrownException
protected
Exception
$thrownException
$testName
private
string
$testName
Methods
__construct()
Constructs a TestFailure with the given test and exception.
public
__construct(PHPUnit_Framework_Test $failedTest, Exception $thrownException) : mixed
Parameters
- $failedTest : PHPUnit_Framework_Test
- $thrownException : Exception
Return values
mixed —exceptionMessage()
Returns the exception's message.
public
exceptionMessage() : string
Return values
string —exceptionToString()
Returns a description for an exception.
public
static exceptionToString(Exception $e) : string
Parameters
- $e : Exception
Tags
Return values
string —failedTest()
Returns the failing test.
public
failedTest() : PHPUnit_Framework_Test|null
Note: The test object is not set when the test is executed in process isolation.
Tags
Return values
PHPUnit_Framework_Test|null —getExceptionAsString()
Returns a description for the thrown exception.
public
getExceptionAsString() : string
Tags
Return values
string —getTestName()
Returns the name of the failing test (including data set, if any).
public
getTestName() : string
Tags
Return values
string —isFailure()
Returns true if the thrown exception is of type AssertionFailedError.
public
isFailure() : bool
Return values
bool —thrownException()
Gets the thrown exception.
public
thrownException() : Exception
Return values
Exception —toString()
Returns a short description of the failure.
public
toString() : string