mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
only try to get comparison failure for the appropriate object
This commit is contained in:
parent
a7865b5d1d
commit
6557e3bafe
1 changed files with 6 additions and 4 deletions
|
@ -249,11 +249,13 @@ class CakeHtmlReporter extends CakeBaseReporter {
|
||||||
$testName = get_class($test) . '(' . $test->getName() . ')';
|
$testName = get_class($test) . '(' . $test->getName() . ')';
|
||||||
|
|
||||||
$actualMsg = $expectedMsg = null;
|
$actualMsg = $expectedMsg = null;
|
||||||
$failure = $message->getComparisonFailure();
|
if (method_exists($message, 'comparisonFailure')) {
|
||||||
|
$failure = $message->comparisonFailure();
|
||||||
if (is_object($failure)) {
|
if (is_object($failure)) {
|
||||||
$actualMsg = $message->getComparisonFailure()->getActualAsString();
|
$actualMsg = $message->getComparisonFailure()->getActualAsString();
|
||||||
$expectedMsg = $message->getComparisonFailure()->getExpectedAsString();
|
$expectedMsg = $message->getComparisonFailure()->getExpectedAsString();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
echo "<li class='fail'>\n";
|
echo "<li class='fail'>\n";
|
||||||
echo "<span>Failed</span>";
|
echo "<span>Failed</span>";
|
||||||
|
|
Loading…
Reference in a new issue