| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 2 |
| CRAP Score | 5.667 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | 38 | public static function _setUpFactories(): void |
|
| 22 | { |
||
| 23 | 38 | if (!\is_subclass_of(static::class, KernelTestCase::class)) { |
|
| 24 | throw new \RuntimeException(\sprintf('The "%s" trait can only be used on TestCases that extend "%s".', __TRAIT__, KernelTestCase::class)); |
||
| 25 | } |
||
| 26 | |||
| 27 | PersistenceManager::register(new LazyManagerRegistry(static function() { |
||
| 28 | if (!static::$booted) { |
||
| 29 | static::bootKernel(); |
||
| 30 | } |
||
| 31 | |||
| 32 | return static::$kernel->getContainer()->get('doctrine'); |
||
| 33 | 38 | })); |
|
| 46 |