\PHPUnit_Framework_ExpectationFailedException

Exception for expectations which failed their check.

The exception contains the error message and optionally a
SebastianBergmann\Comparator\ComparisonFailure which is used to
generate diff output of the failed expectations.

Synopsis

class PHPUnit_Framework_ExpectationFailedException extends PHPUnit_Framework_AssertionFailedError {
  • // Inherited members from PHPUnit_Framework_Exception
  • protected array $serializableTrace;
  • // Inherited members from RuntimeException
  • protected  $message;
  • protected  $code;
  • protected  $file;
  • protected  $line;
  • // Inherited members from Exception
  • protected  $message;
  • protected  $code;
  • protected  $file;
  • protected  $line;
  • // Inherited methods from PHPUnit_Framework_AssertionFailedError
  • public string toString()
}

Hierarchy

Violations

Checkstyle

Line Column Severity Message
68 144 warning Line exceeds 120 characters; contains 143 characters

Members

protected

  • $code — int
    The exception code
  • $code — int
    The exception code
  • $comparisonFailureSebastianBergmann\Comparator\ComparisonFailure
  • $file — string
    The filename where the exception was created
  • $file — string
    The filename where the exception was created
  • $line — int
    The line where the exception was created
  • $line — int
    The line where the exception was created
  • $message — string
    The exception message
  • $message — string
    The exception message
  • $serializableTrace — array

Methods

public

Inherited from PHPUnit_Framework_AssertionFailedError

public

  • toString() — Wrapper for getMessage() which is declared as final.

Inherited from PHPUnit_Framework_Exception

public

Inherited from RuntimeException

public

Inherited from Exception

public

History