Skip to content
Permalink
Browse files

only try to get comparison failure for the appropriate object

  • Loading branch information...
dereuromark committed Jul 21, 2012
1 parent a7865b5 commit 6557e3bafe6fe0dfcaa8dd5d654309cac12120a1
Showing with 6 additions and 4 deletions.
  1. +6 −4 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";

0 comments on commit 6557e3b

Please sign in to comment.
You can’t perform that action at this time.