Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

Commit e3f35f1

Browse files
fffilimonovDavertMik
authored andcommitted
display expected/actual from phpunit assert in HTML report (#12)
1 parent 2e6719f commit e3f35f1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ResultPrinter/HTML.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,9 @@ protected function renderSubsteps(Meta $metaStep, $substepsBuffer)
297297
private function cleanMessage($exception)
298298
{
299299
$msg = $exception->getMessage();
300+
if ($exception instanceof \PHPUnit\Framework\AssertionFailedError && $exception->getComparisonFailure()) {
301+
$msg .= $exception->getComparisonFailure()->getDiff();
302+
}
300303
$msg = str_replace(['<info>','</info>','<bold>','</bold>'], ['','','',''], $msg);
301304
return htmlentities($msg);
302305
}

0 commit comments

Comments
 (0)