mirror of
https://github.com/pestphp/pest.git
synced 2026-03-12 10:47:25 +01:00
fix: panic with TestDescriptionMissing
This commit is contained in:
@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||||||
namespace Pest;
|
namespace Pest;
|
||||||
|
|
||||||
use NunoMaduro\Collision\Writer;
|
use NunoMaduro\Collision\Writer;
|
||||||
|
use Pest\Exceptions\TestDescriptionMissing;
|
||||||
use Pest\Support\Container;
|
use Pest\Support\Container;
|
||||||
use Symfony\Component\Console\Output\ConsoleOutput;
|
use Symfony\Component\Console\Output\ConsoleOutput;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
@ -27,6 +28,10 @@ final class Panic
|
|||||||
*/
|
*/
|
||||||
public static function with(Throwable $throwable): never
|
public static function with(Throwable $throwable): never
|
||||||
{
|
{
|
||||||
|
if ($throwable instanceof TestDescriptionMissing && ! is_null($previous = $throwable->getPrevious())) {
|
||||||
|
$throwable = $previous;
|
||||||
|
}
|
||||||
|
|
||||||
$panic = new self($throwable);
|
$panic = new self($throwable);
|
||||||
|
|
||||||
$panic->handle();
|
$panic->handle();
|
||||||
|
|||||||
Reference in New Issue
Block a user