Skip to content

Commit

Permalink
Fix possible notice errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jun 27, 2012
1 parent 7d93c57 commit 87677e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php
Expand Up @@ -248,19 +248,19 @@ public function paintFail($message, $test) {
$trace = $this->_getStackTrace($message);
$testName = get_class($test) . '(' . $test->getName() . ')';

$actualMsg = $expectedMsg = null;
$failure = $message->getComparisonFailure();
if (is_object($failure)) {
$actualMsg = $message->getComparisonFailure()->getActualAsString();
$expectedMsg = $message->getComparisonFailure()->getExpectedAsString();
$actualMsg = $message->getComparisonFailure()->getActualAsString();
$expectedMsg = $message->getComparisonFailure()->getExpectedAsString();
}

echo "<li class='fail'>\n";
echo "<span>Failed</span>";
echo "<div class='msg'><pre>" . $this->_htmlEntities($message->toString());


if ((is_string($actualMsg) && is_string($expectedMsg)) || (is_array($actualMsg) && is_array($expectedMsg))) {
echo "<br />" . PHPUnit_Util_Diff::diff($expectedMsg, $actualMsg);
echo "<br />" . PHPUnit_Util_Diff::diff($expectedMsg, $actualMsg);
}

echo "</pre></div>\n";
Expand Down

0 comments on commit 87677e4

Please sign in to comment.