2727use Nyholm \BundleTest \TestKernel ;
2828use Nyholm \NSA ;
2929use Symfony \Bundle \FrameworkBundle \Test \KernelTestCase ;
30- use Symfony \Component \HttpKernel \KernelInterface ;
3130
3231final class BundleInitializationTest extends KernelTestCase
3332{
@@ -36,11 +35,12 @@ protected static function getKernelClass(): string
3635 return TestKernel::class;
3736 }
3837
39- protected static function createKernel (array $ options = []): KernelInterface
38+ /**
39+ * @param array<mixed> $options
40+ */
41+ protected static function createKernel (array $ options = []): TestKernel
4042 {
41- /**
42- * @var TestKernel $kernel
43- */
43+ /** @var TestKernel $kernel */
4444 $ kernel = parent ::createKernel ($ options );
4545 $ kernel ->addTestBundle (BazingaGeocoderBundle::class);
4646 $ kernel ->handleOptions ($ options );
@@ -93,6 +93,7 @@ public function testBundleWithCachedProvider(): void
9393 $ service = $ container ->get ('bazinga_geocoder.provider.acme ' );
9494 self ::assertInstanceOf (PluginProvider::class, $ service );
9595 $ plugins = NSA ::getProperty ($ service , 'plugins ' );
96+ self ::assertIsArray ($ plugins );
9697 self ::assertNotEmpty ($ plugins );
9798 self ::assertInstanceOf (CachePlugin::class, $ plugins [0 ]);
9899 }
@@ -114,6 +115,7 @@ public function testCacheLifetimeCanBeNull(): void
114115 self ::assertInstanceOf (PluginProvider::class, $ service );
115116
116117 $ plugins = NSA ::getProperty ($ service , 'plugins ' );
118+ self ::assertIsArray ($ plugins );
117119 self ::assertCount (1 , $ plugins );
118120
119121 $ cachePlugin = array_shift ($ plugins );
@@ -137,6 +139,7 @@ public function testBundleWithPluginsYml(): void
137139 $ service = $ container ->get ('bazinga_geocoder.provider.acme ' );
138140 self ::assertInstanceOf (PluginProvider::class, $ service );
139141 $ plugins = NSA ::getProperty ($ service , 'plugins ' );
142+ self ::assertIsArray ($ plugins );
140143 self ::assertCount (3 , $ plugins );
141144 self ::assertInstanceOf (LoggerPlugin::class, $ plugins [0 ]);
142145 }
0 commit comments