Skip to content

Commit

Permalink
display expected/actual from phpunit assert in HTML report (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
fffilimonov authored and DavertMik committed Mar 12, 2018
1 parent 2e6719f commit e3f35f1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ResultPrinter/HTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@ protected function renderSubsteps(Meta $metaStep, $substepsBuffer)
private function cleanMessage($exception)
{
$msg = $exception->getMessage();
if ($exception instanceof \PHPUnit\Framework\AssertionFailedError && $exception->getComparisonFailure()) {
$msg .= $exception->getComparisonFailure()->getDiff();
}
$msg = str_replace(['<info>','</info>','<bold>','</bold>'], ['','','',''], $msg);
return htmlentities($msg);
}
Expand Down

0 comments on commit e3f35f1

Please sign in to comment.