44
55use Nette \DI \Compiler ;
66use Nette \DI \ContainerLoader ;
7+ use PHPStan \DependencyInjection \ParametersSchemaExtension ;
78use PHPStan \DependencyInjection \RulesExtension ;
89use PHPUnit \Framework \TestCase ;
910use function sprintf ;
@@ -24,21 +25,25 @@ public function testExtensionNeon(): void
2425
2526 $ class = $ loader ->load (function (Compiler $ compiler ): void {
2627 $ compiler ->addExtension ('rules ' , new RulesExtension ());
28+ $ compiler ->addExtension ('parametersSchema ' , new ParametersSchemaExtension ());
2729 $ compiler ->addConfig (['parameters ' => ['rootDir ' => __DIR__ ]]);
2830 $ compiler ->loadConfig (__DIR__ . '/../../extension.neon ' );
2931 $ compiler ->loadConfig (__DIR__ . '/config.neon ' );
3032 }, $ key );
3133 /** @var \Nette\DI\Container $container */
3234 $ container = new $ class ();
3335
36+ $ parameters = $ container ->getParameters ();
37+ unset($ parameters ['__parametersSchema ' ]);
38+
3439 self ::assertSame ([
3540 'rootDir ' => __DIR__ ,
3641 'symfony ' => [
3742 'container_xml_path ' => __DIR__ . '/container.xml ' ,
3843 'constant_hassers ' => true ,
3944 'console_application_loader ' => null ,
4045 ],
41- ], $ container -> getParameters () );
46+ ], $ parameters );
4247
4348 self ::assertCount (6 , $ container ->findByTag ('phpstan.rules.rule ' ));
4449 self ::assertCount (11 , $ container ->findByTag ('phpstan.broker.dynamicMethodReturnTypeExtension ' ));
0 commit comments