File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
1919### Changed
2020
21+ - Dev: added a test for ` ItkDevOpenIdConnectBundle::getContainerExtension() `
22+ asserting the custom extension is created and memoized (same instance on
23+ repeated calls), prompted by mutation testing findings. No effect on the
24+ published package.
2125- Dev: strengthened DependencyInjection tests based on mutation testing
2226 findings — the extension's container wiring (cache pool reference,
2327 provider options mapping, CLI login route arguments) is now asserted
Original file line number Diff line number Diff line change 44
55use ItkDev \OpenIdConnectBundle \Command \UserLoginCommand ;
66use ItkDev \OpenIdConnectBundle \Controller \LoginController ;
7+ use ItkDev \OpenIdConnectBundle \DependencyInjection \ItkDevOpenIdConnectExtension ;
8+ use ItkDev \OpenIdConnectBundle \ItkDevOpenIdConnectBundle ;
79use ItkDev \OpenIdConnectBundle \Security \CliLoginTokenAuthenticator ;
810use ItkDev \OpenIdConnectBundle \Security \OpenIdConfigurationProviderManager ;
911use ItkDev \OpenIdConnectBundle \Security \OpenIdLoginAuthenticator ;
@@ -57,4 +59,18 @@ public function testServiceWiring(): void
5759 $ authenticator = $ container ->get (CliLoginTokenAuthenticator::class);
5860 $ this ->assertInstanceOf (CliLoginTokenAuthenticator::class, $ authenticator );
5961 }
62+
63+ /**
64+ * Test that the custom container extension is created and memoized.
65+ */
66+ public function testGetContainerExtension (): void
67+ {
68+ $ bundle = new ItkDevOpenIdConnectBundle ();
69+
70+ $ extension = $ bundle ->getContainerExtension ();
71+ $ this ->assertInstanceOf (ItkDevOpenIdConnectExtension::class, $ extension );
72+
73+ // Repeated calls must return the same instance, not recreate it.
74+ $ this ->assertSame ($ extension , $ bundle ->getContainerExtension ());
75+ }
6076}
You can’t perform that action at this time.
0 commit comments