3 * This file is part of PHPUnit.
5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
12 * Exception for expectations which failed their check.
14 * The exception contains the error message and optionally a
15 * SebastianBergmann\Comparator\ComparisonFailure which is used to
16 * generate diff output of the failed expectations.
18 * @since Class available since Release 3.0.0
20 class PHPUnit_Framework_ExpectationFailedException extends PHPUnit_Framework_AssertionFailedError
23 * @var SebastianBergmann\Comparator\ComparisonFailure
25 protected $comparisonFailure;
27 public function __construct($message, SebastianBergmann\Comparator\ComparisonFailure $comparisonFailure = null, Exception $previous = null)
29 $this->comparisonFailure = $comparisonFailure;
31 parent::__construct($message, 0, $previous);
35 * @return SebastianBergmann\Comparator\ComparisonFailure
37 public function getComparisonFailure()
39 return $this->comparisonFailure;