Skip to content

Commit

Permalink
Check for the methods that will be called.
Browse files Browse the repository at this point in the history
Check the same methods that are called. Without this diffs are not
printed for failures.

Fixes #3503
  • Loading branch information
markstory committed Jan 1, 2013
1 parent 2e4bde0 commit 6597156
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php
Expand Up @@ -251,11 +251,11 @@ public function paintFail($message, $test) {
$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();
}
}

Expand Down

0 comments on commit 6597156

Please sign in to comment.