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

Commit 42c8fdb

Browse files
TenzianDavertMik
authored andcommitted
src/ResultPrinter/HTML.php: cleanMessage() Exception Instance (#16)
Fix #15 - change exception to instance of ExpectationFailedException
1 parent 511d872 commit 42c8fdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ResultPrinter/HTML.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ 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()) {
300+
if ($exception instanceof \PHPUnit\Framework\ExpectationFailedException && $exception->getComparisonFailure()) {
301301
$msg .= $exception->getComparisonFailure()->getDiff();
302302
}
303303
$msg = str_replace(['<info>','</info>','<bold>','</bold>'], ['','','',''], $msg);

0 commit comments

Comments
 (0)