file-fetcher
Public Member Functions | Static Public Member Functions | List of all members
PHPUnit\Framework\TestFailure Class Reference

Public Member Functions

 __construct (Test $failedTest, $t)
 
 toString ()
 
 getExceptionAsString ()
 
 getTestName ()
 
 failedTest ()
 
 thrownException ()
 
 exceptionMessage ()
 
 isFailure ()
 

Static Public Member Functions

static exceptionToString (Throwable $e)
 

Constructor & Destructor Documentation

◆ __construct()

PHPUnit\Framework\TestFailure::__construct ( Test  $failedTest,
  $t 
)

Constructs a TestFailure with the given test and exception.

Parameters
Throwable$t

Member Function Documentation

◆ exceptionMessage()

PHPUnit\Framework\TestFailure::exceptionMessage ( )

Returns the exception's message.

◆ exceptionToString()

static PHPUnit\Framework\TestFailure::exceptionToString ( Throwable  $e)
static

Returns a description for an exception.

◆ failedTest()

PHPUnit\Framework\TestFailure::failedTest ( )

Returns the failing test.

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

See also
Exception

◆ getExceptionAsString()

PHPUnit\Framework\TestFailure::getExceptionAsString ( )

Returns a description for the thrown exception.

◆ getTestName()

PHPUnit\Framework\TestFailure::getTestName ( )

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

◆ isFailure()

PHPUnit\Framework\TestFailure::isFailure ( )

Returns true if the thrown exception is of type AssertionFailedError.

◆ thrownException()

PHPUnit\Framework\TestFailure::thrownException ( )

Gets the thrown exception.

◆ toString()

PHPUnit\Framework\TestFailure::toString ( )

Returns a short description of the failure.


The documentation for this class was generated from the following file: