mirror of
https://github.com/pestphp/pest.git
synced 2026-03-10 17:57:23 +01:00
Add Initial teamcity support
This commit is contained in:
@ -6,6 +6,7 @@ namespace Pest\Bootstrappers;
|
||||
|
||||
use Pest\Contracts\Bootstrapper;
|
||||
use Pest\Subscribers;
|
||||
use Pest\Support\Container;
|
||||
use PHPUnit\Event;
|
||||
use PHPUnit\Event\Subscriber;
|
||||
|
||||
@ -25,16 +26,24 @@ final class BootSubscribers implements Bootstrapper
|
||||
Subscribers\EnsureRetryRepositoryExists::class,
|
||||
Subscribers\EnsureErroredTestsAreRetryable::class,
|
||||
Subscribers\EnsureFailedTestsAreRetryable::class,
|
||||
Subscribers\EnsureTeamCityEnabled::class,
|
||||
];
|
||||
|
||||
public function __construct(
|
||||
private readonly Container $container,
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Boots the Subscribers.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
foreach (self::SUBSCRIBERS as $subscriber) {
|
||||
/** @var Subscriber $instance */
|
||||
$instance = $this->container->get($subscriber);
|
||||
Event\Facade::registerSubscriber(
|
||||
new $subscriber()
|
||||
$instance
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user