Copied!
  • internal This class is not covered by the backward compatibility promise for PHPUnit
Cloneable Final Instantiable
Methods
public __construct ( PHPUnit\Framework\Test $failedTest , Throwable $t )
 

Constructs a TestFailure with the given test and exception.

public exceptionMessage () : string
 

Returns the exception's message.

public static exceptionToString ( Throwable $e ) : string
 

Returns a description for an exception.

public failedTest () : ? PHPUnit\Framework\Test
 

Returns the failing test.

Note: The test object is not set when the test is executed in process
isolation.

  • see \Exception
public getExceptionAsString () : string
 

Returns a description for the thrown exception.

public getTestName () : string
 

Returns the name of the failing test (including data set, if any).

public isFailure () : bool
 

Returns true if the thrown exception
is of type AssertionFailedError.

public thrownException () : Throwable
 

Gets the thrown exception.

public toString () : string
 

Returns a short description of the failure.

Properties
private $failedTest
 
  • var null | Test
private $testName
 
  • var string
private $thrownException
 
  • var Throwable
Methods
public static exceptionToString ( Throwable $e ) : string
 

Returns a description for an exception.

© 2021 Bruce Wells
Search Namespaces \ Classes
Configuration