Total Complexity | 2 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | final class DisableListenersTest extends TestCase |
||
15 | { |
||
16 | #[PreserveGlobalState(false)] |
||
17 | public function test_disable_class_resolver_listener(): void |
||
18 | { |
||
19 | Gacela::bootstrap(__DIR__, function (GacelaConfig $config): void { |
||
20 | $config->disableEventListeners(); |
||
21 | |||
22 | $config->registerGenericListener(function (): never { |
||
23 | $this->throwExceptionListener(); |
||
24 | }); |
||
25 | }); |
||
26 | |||
27 | $facade = new Facade(); |
||
28 | $facade->doString(); |
||
29 | |||
30 | $facade = new Facade(); |
||
31 | $facade->doString(); |
||
32 | |||
33 | $this->expectNotToPerformAssertions(); |
||
34 | } |
||
35 | |||
36 | public function throwExceptionListener(): never |
||
39 | } |
||
40 | } |
||
41 |