mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Merge pull request #726 from dereuromark/2.3-html-reporter-fix
only try to get comparison failure for the appropriate object
This commit is contained in:
commit
f858ea3007
1 changed files with 6 additions and 4 deletions
|
@ -249,10 +249,12 @@ class CakeHtmlReporter extends CakeBaseReporter {
|
|||
$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";
|
||||
|
|
Loading…
Add table
Reference in a new issue