| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function test_singleton_altered_via_pre_plugin(): void |
||
| 17 | { |
||
| 18 | Locator::getInstance()->add('singleton', new StringValue('original')); |
||
| 19 | |||
| 20 | Gacela::bootstrap(__DIR__, static function (GacelaConfig $config): void { |
||
| 21 | $config->prePlugins([ |
||
| 22 | ExamplePlugin::class, |
||
| 23 | ]); |
||
| 24 | }); |
||
| 25 | |||
| 26 | /** @var StringValue $singleton */ |
||
| 27 | $singleton = Locator::getInstance()->get('singleton'); |
||
| 28 | |||
| 29 | self::assertSame('updated from plugin', $singleton->value()); |
||
| 30 | } |
||
| 32 |