Throws an exception for the given compared value and test description
mixed $other Evaluated value or object.:
string $description Additional information about the test:
PHPUnit_Framework_ComparisonFailure $comparisonFailure:
PHPUnit_Framework_ExpectationFailedException
protected function fail($other, $description, PHPUnit_Framework_ComparisonFailure $comparisonFailure = NULL) {
$failureDescription = sprintf('Failed asserting that %s.', $this
->failureDescription($other));
$additionalFailureDescription = $this
->additionalFailureDescription($other);
if ($additionalFailureDescription) {
$failureDescription .= "\n" . $additionalFailureDescription;
}
if (!empty($description)) {
$failureDescription = $description . "\n" . $failureDescription;
}
throw new PHPUnit_Framework_ExpectationFailedException($failureDescription, $comparisonFailure);
}