Skip to content

Commit

Permalink
src/ResultPrinter/HTML.php: cleanMessage() Exception Instance (#16)
Browse files Browse the repository at this point in the history
Fix #15

- change exception to instance of ExpectationFailedException
  • Loading branch information
Tenzian authored and DavertMik committed Mar 16, 2018
1 parent 511d872 commit 42c8fdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ResultPrinter/HTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ protected function renderSubsteps(Meta $metaStep, $substepsBuffer)
private function cleanMessage($exception)
{
$msg = $exception->getMessage();
if ($exception instanceof \PHPUnit\Framework\AssertionFailedError && $exception->getComparisonFailure()) {
if ($exception instanceof \PHPUnit\Framework\ExpectationFailedException && $exception->getComparisonFailure()) {
$msg .= $exception->getComparisonFailure()->getDiff();
}
$msg = str_replace(['<info>','</info>','<bold>','</bold>'], ['','','',''], $msg);
Expand Down

0 comments on commit 42c8fdb

Please sign in to comment.