PHP Class PHPUnit_Framework_TestFailure, horde

Author: Sebastian Bergmann ([email protected])
Show file Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$failedTest PHPUnit_Framework_Test | null
$thrownException Exception

Public Methods

Method Description
__construct ( PHPUnit_Framework_Test $failedTest, Exception $thrownException ) Constructs a TestFailure with the given test and exception.
exceptionMessage ( ) : string Returns the exception's message.
exceptionToString ( Exception $e ) : 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 ( ) : boolean 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.

Method Details

__construct() public method

Constructs a TestFailure with the given test and exception.
public __construct ( PHPUnit_Framework_Test $failedTest, Exception $thrownException )
$failedTest PHPUnit_Framework_Test
$thrownException Exception

exceptionMessage() public method

Returns the exception's message.
public exceptionMessage ( ) : string
return string

exceptionToString() public static method

Returns a description for an exception.
public static exceptionToString ( Exception $e ) : string
$e Exception
return string

failedTest() public method

Note: The test object is not set when the test is executed in process isolation.
See also: PHPUnit_Framework_Exception
public failedTest ( ) : PHPUnit_Framework_Test | null
return PHPUnit_Framework_Test | null

getExceptionAsString() public method

Returns a description for the thrown exception.
public getExceptionAsString ( ) : string
return string

getTestName() public method

Returns the name of the failing test (including data set, if any).
public getTestName ( ) : string
return string

isFailure() public method

Returns true if the thrown exception is of type AssertionFailedError.
public isFailure ( ) : boolean
return boolean

thrownException() public method

Gets the thrown exception.
public thrownException ( ) : Exception
return Exception

toString() public method

Returns a short description of the failure.
public toString ( ) : string
return string

Property Details

$failedTest protected property

protected PHPUnit_Framework_Test|null $failedTest
return PHPUnit_Framework_Test | null

$thrownException protected property

protected Exception $thrownException
return Exception