| Conditions | 4 |
| Paths | 3 |
| Total Lines | 24 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | 731 | public static function _setUpFactories(): void |
|
| 20 | { |
||
| 21 | 731 | if (!\is_subclass_of(static::class, KernelTestCase::class)) { |
|
| 22 | 264 | TestState::bootFoundry(); |
|
| 23 | |||
| 24 | 264 | return; |
|
| 25 | } |
||
| 26 | |||
| 27 | 467 | if (!static::$booted) { |
|
| 28 | 467 | static::bootKernel(); |
|
| 29 | } |
||
| 30 | |||
| 31 | 467 | TestState::bootFromContainer(static::$kernel->getContainer()); |
|
| 32 | 467 | Factory::configuration()->setManagerRegistry( |
|
| 33 | new LazyManagerRegistry(static function() { |
||
| 34 | 214 | if (!static::$booted) { |
|
| 35 | 214 | static::bootKernel(); |
|
| 36 | } |
||
| 37 | |||
| 38 | 214 | return static::$kernel->getContainer()->get('doctrine'); |
|
| 39 | 467 | }) |
|
| 40 | ); |
||
| 41 | |||
| 42 | 467 | self::ensureKernelShutdown(); |
|
| 43 | 467 | } |
|
| 54 |