class (none) \ PHPUnit_Framework_ExpectationFailedException

All implemented interfaces:
PHPUnit_Framework_SelfDescribing, PHPUnit_Exception

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.

See Also:
http://fabien.potencier.org/article/9/php-serialization-stack-traces-and-exceptions

Method Summary

Name Description
__construct($message, ComparisonFailure $comparisonFailure = null, Exception $previous = null)
getComparisonFailure()

Inherited Method Summary

Name Description
__sleep() (from PHPUnit_Framework_Exception)
__toString() (from PHPUnit_Framework_Exception)
getSerializableTrace()Returns the serializable trace (without 'args'). (from PHPUnit_Framework_Exception)
toString()Wrapper for getMessage() which is declared as final. (from PHPUnit_Framework_AssertionFailedError)

public function __construct($message, ComparisonFailure $comparisonFailure = null, Exception $previous = null)

Overrides:
__construct($message = "", $code = 0, Exception $previous = null)
Defaults:
comparisonFailure = null
previous = null

public function getComparisonFailure()

Returns:
SebastianBergmann\Comparator\ComparisonFailure