| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2.0185 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 51 | 634 | public static function _resetSchema(): void |
|
| 52 | { |
||
| 53 | 634 | if (!\is_subclass_of(static::class, KernelTestCase::class)) { |
|
| 54 | throw new \RuntimeException(\sprintf('The "%s" trait can only be used on TestCases that extend "%s".', __TRAIT__, KernelTestCase::class)); |
||
| 55 | 253 | } |
|
| 56 | |||
| 57 | $kernel = static::createKernel(); |
||
| 58 | 381 | $kernel->boot(); |
|
| 59 | |||
| 60 | DatabaseResetter::resetSchema($kernel); |
||
| 61 | |||
| 62 | 381 | $kernel->shutdown(); |
|
| 63 | 381 | } |
|
| 65 |