mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
24 lines
432 B
PHP
24 lines
432 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Pest\Subscribers;
|
|
|
|
use Pest\TestSuite;
|
|
use PHPUnit\Event\Test\Failed;
|
|
use PHPUnit\Event\Test\FailedSubscriber;
|
|
|
|
/**
|
|
* @internal
|
|
*/
|
|
final class EnsureFailedTestsAreRetryable implements FailedSubscriber
|
|
{
|
|
/**
|
|
* Runs the subscriber.
|
|
*/
|
|
public function notify(Failed $event): void
|
|
{
|
|
TestSuite::getInstance()->retryRepository->add($event->test()->id());
|
|
}
|
|
}
|