| Total Complexity | 3 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | trait TestWithContainer |
||
| 15 | { |
||
| 16 | protected function tearDown(): void |
||
| 17 | { |
||
| 18 | global $container; |
||
| 19 | $container = null; |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Create the global `$container` variable with Felix default configuration. |
||
| 24 | */ |
||
| 25 | private function createDefaultFelixContainer(): void |
||
| 26 | { |
||
| 27 | $defaultFelixConfiguration = new ConfigAggregator([ |
||
| 28 | ConfigProvider::class, |
||
| 29 | ]); |
||
| 30 | |||
| 31 | $this->createContainer($defaultFelixConfiguration); |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Create the global `$container` variable with the given configuration. |
||
| 36 | */ |
||
| 37 | private function createContainer(ConfigAggregator $aggregator): void |
||
| 45 | } |
||
| 46 | } |
||
| 47 |