diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 52573ffe..81edca3e 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -39,8 +39,11 @@ class Handler extends ExceptionHandler return $trace; }) ->filter(function ($trace) { - return Str::startsWith($trace['file'], 'app') || + // @codeCoverageIgnoreStart + $isFromPlugins = ! app()->runningUnitTests() && Str::contains($trace['file'], resolve('plugins')->getPluginsDirs()->all()); + // @codeCoverageIgnoreEnd + return Str::startsWith($trace['file'], 'app') || $isFromPlugins; }) ->values(), ];