-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathBootstrap.php
More file actions
32 lines (26 loc) · 755 Bytes
/
Copy pathBootstrap.php
File metadata and controls
32 lines (26 loc) · 755 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
declare(strict_types=1);
namespace Codeception\Subscriber;
use Codeception\Configuration;
use Codeception\Event\SuiteEvent;
use Codeception\Events;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class Bootstrap implements EventSubscriberInterface
{
use Shared\StaticEventsTrait;
/**
* @var array<string, string>
*/
protected static array $events = [
Events::SUITE_INIT => 'loadBootstrap',
];
public function loadBootstrap(SuiteEvent $event): void
{
$settings = $event->getSettings();
$bootstrap = $settings['bootstrap'] ?? '';
if ($bootstrap === '') {
return;
}
Configuration::loadBootstrap($bootstrap, $settings['path']);
}
}