Permalink
Browse files

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
  • Loading branch information...
1 parent 2e4bde0 commit 659715664d648d9a599002b5a7c3b55505efdcde @markstory markstory committed Jan 1, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php
@@ -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();
}
}

0 comments on commit 6597156

Please sign in to comment.