You are here

class PHPUnit_Framework_ExpectationFailedException in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/src/Framework/ExpectationFailedException.php \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.

@since Class available since Release 3.0.0

Hierarchy

Expanded class hierarchy of PHPUnit_Framework_ExpectationFailedException

1 string reference to 'PHPUnit_Framework_ExpectationFailedException'
Framework_MockObject_Matcher_ConsecutiveParametersTest::testIntegrationExpectingException in vendor/phpunit/phpunit-mock-objects/tests/MockObject/Matcher/ConsecutiveParametersTest.php

File

vendor/phpunit/phpunit/src/Framework/ExpectationFailedException.php, line 20

View source
class PHPUnit_Framework_ExpectationFailedException extends PHPUnit_Framework_AssertionFailedError {

  /**
   * @var SebastianBergmann\Comparator\ComparisonFailure
   */
  protected $comparisonFailure;
  public function __construct($message, SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = null, Exception $previous = null) {
    $this->comparisonFailure = $comparisonFailure;
    parent::__construct($message, 0, $previous);
  }

  /**
   * @return SebastianBergmann\Comparator\ComparisonFailure
   */
  public function getComparisonFailure() {
    return $this->comparisonFailure;
  }

}

Members