diff --git a/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php b/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php index 27599a64a..ac622e2e2 100644 --- a/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php +++ b/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php @@ -248,9 +248,22 @@ class CakeHtmlReporter extends CakeBaseReporter { $trace = $this->_getStackTrace($message); $testName = get_class($test) . '(' . $test->getName() . ')'; + $failure = $message->getComparisonFailure(); + if (is_object($failure)) { + $actualMsg = $message->getComparisonFailure()->getActualAsString(); + $expectedMsg = $message->getComparisonFailure()->getExpectedAsString(); + } + echo "
" . $this->_htmlEntities($message->toString()) . "
" . $this->_htmlEntities($message->toString()); + + + if ((is_string($actualMsg) && is_string($expectedMsg)) || (is_array($actualMsg) && is_array($expectedMsg))) { + echo "
" . PHPUnit_Util_Diff::diff($expectedMsg, $actualMsg); + } + + echo "