|
18 | 18 | use Codeception\Test\Interfaces\ScenarioDriven;
|
19 | 19 | use Codeception\TestInterface;
|
20 | 20 | use Codeception\Util\Debug;
|
| 21 | +use NunoMaduro\Collision\Writer; |
21 | 22 | use Symfony\Component\Console\Output\OutputInterface;
|
22 | 23 | use Symfony\Component\Console\Formatter\OutputFormatter;
|
23 | 24 | use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
| 25 | +use Whoops\Exception\Inspector; |
24 | 26 |
|
25 | 27 | class Console implements EventSubscriberInterface
|
26 | 28 | {
|
@@ -465,6 +467,20 @@ public function printExceptionTrace($e)
|
465 | 467 | return;
|
466 | 468 | }
|
467 | 469 |
|
| 470 | + $writer = (new Writer())->setOutput($this->output); |
| 471 | + $inspector = new Inspector($e); |
| 472 | + |
| 473 | + $writer->ignoreFilesIn([ |
| 474 | + '/vendor\/codeception\/', |
| 475 | + '/vendor\/phpunit\/phpunit\/src/', |
| 476 | + '/vendor\/mockery\/mockery/', |
| 477 | + '/vendor\/laravel\/framework\/src\/Illuminate\/Testing/', |
| 478 | + '/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Testing/', |
| 479 | + ]); |
| 480 | + |
| 481 | + $writer->showTrace(false); |
| 482 | + $writer->write($inspector); |
| 483 | + |
468 | 484 | if ($this->rawStackTrace) {
|
469 | 485 | $this->message(OutputFormatter::escape(\PHPUnit\Util\Filter::getFilteredStacktrace($e, true, false)))->writeln();
|
470 | 486 |
|
|
0 commit comments