Total Complexity | 2 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | final class FeatureTest extends TestCase |
||
16 | { |
||
17 | public function test_singleton_altered_via_plugin_with_constructor(): void |
||
18 | { |
||
19 | Gacela::bootstrap(__DIR__, static function (GacelaConfig $config): void { |
||
20 | $config->addPlugin(ExamplePluginWithConstructor::class); |
||
21 | }); |
||
22 | |||
23 | $singleton = Gacela::get(StringValue::class); |
||
24 | |||
25 | self::assertSame('Set from plugin ExamplePluginWithConstructor', $singleton->value()); |
||
26 | } |
||
27 | |||
28 | public function test_singleton_altered_via_plugin_without_constructor(): void |
||
37 | } |
||
38 | } |
||
39 |