File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
tests/bitExpert/PHPStan/Magento/Autoload Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -21,15 +21,25 @@ class RegistrationUnitTest extends TestCase
2121 * @test
2222 * @dataProvider provideAutoloaders()
2323 */
24- public function autoloadersCanRegisterAndUnregister (Autoloader $ autoloader )
24+ public function autoloadersCanRegisterAndUnregister (Autoloader $ autoloader ): void
2525 {
26- $ autoloadFunctions = spl_autoload_functions ();
26+ /** @var array<callable> $initialAutoloadFunctions */
27+ $ initialAutoloadFunctions = spl_autoload_functions ();
28+
2729 $ autoloader ->register ();
28- static ::assertCount (count ($ autoloadFunctions ) + 1 , spl_autoload_functions ());
30+ /** @var array<callable> $registerAutoloadFunctions */
31+ $ registerAutoloadFunctions = spl_autoload_functions ();
32+ static ::assertCount (count ($ initialAutoloadFunctions ) + 1 , $ registerAutoloadFunctions );
33+
2934 $ autoloader ->unregister ();
30- static ::assertCount (count ($ autoloadFunctions ), spl_autoload_functions ());
35+ /** @var array<callable> $unregisterAutoloadFunctions */
36+ $ unregisterAutoloadFunctions = spl_autoload_functions ();
37+ static ::assertCount (count ($ initialAutoloadFunctions ), $ unregisterAutoloadFunctions );
3138 }
3239
40+ /**
41+ * @return array<array<Autoloader>>
42+ */
3343 public function provideAutoloaders (): array
3444 {
3545 $ cache = new Cache ($ this ->getMockBuilder (\PHPStan \Cache \CacheStorage::class)->getMock ());
You can’t perform that action at this time.
0 commit comments