Check for the methods that will be called.

Check the same methods that are called. Without this diffs are not
printed for failures.

Fixes #3503
This commit is contained in:
mark_story 2013-01-01 14:25:22 -05:00
parent 2e4bde017e
commit 659715664d

View file

@ -251,11 +251,11 @@ class CakeHtmlReporter extends CakeBaseReporter {
$testName = get_class($test) . '(' . $test->getName() . ')';
$actualMsg = $expectedMsg = null;
if (method_exists($message, 'comparisonFailure')) {
$failure = $message->comparisonFailure();
if (method_exists($message, 'getComparisonFailure')) {
$failure = $message->getComparisonFailure();
if (is_object($failure)) {
$actualMsg = $message->getComparisonFailure()->getActualAsString();
$expectedMsg = $message->getComparisonFailure()->getExpectedAsString();
$actualMsg = $failure->getActualAsString();
$expectedMsg = $failure->getExpectedAsString();
}
}