Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

only try to get comparison failure for the appropriate object

  • Loading branch information...
commit 6557e3bafe6fe0dfcaa8dd5d654309cac12120a1 1 parent a7865b5
@dereuromark dereuromark authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php
View
10 lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php
@@ -249,10 +249,12 @@ public function paintFail($message, $test) {
$testName = get_class($test) . '(' . $test->getName() . ')';
$actualMsg = $expectedMsg = null;
- $failure = $message->getComparisonFailure();
- if (is_object($failure)) {
- $actualMsg = $message->getComparisonFailure()->getActualAsString();
- $expectedMsg = $message->getComparisonFailure()->getExpectedAsString();
+ if (method_exists($message, 'comparisonFailure')) {
+ $failure = $message->comparisonFailure();
+ if (is_object($failure)) {
+ $actualMsg = $message->getComparisonFailure()->getActualAsString();
+ $expectedMsg = $message->getComparisonFailure()->getExpectedAsString();
+ }
}
echo "<li class='fail'>\n";
Please sign in to comment.
Something went wrong with that request. Please try again.