| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function test_exception_if_non_bootstrapped(): void |
||
| 16 | { |
||
| 17 | // Needed in order to set up the private `Gacela::$appRootDir as null` for this use case |
||
| 18 | // when you try to access it before bootstrapping the application. |
||
| 19 | $gacelaProxy = new ReflectionClass(Gacela::class); |
||
| 20 | $appRootDirProp = $gacelaProxy->getProperty('appRootDir'); |
||
| 21 | $appRootDirProp->setAccessible(true); |
||
| 22 | $appRootDirProp->setValue(null); |
||
| 23 | |||
| 24 | $this->expectException(GacelaNotBootstrappedException::class); |
||
| 25 | |||
| 26 | Gacela::rootDir(); |
||
| 27 | } |
||
| 38 |