4
4
5
5
use Nette \DI \Compiler ;
6
6
use Nette \DI \ContainerLoader ;
7
+ use PHPStan \DependencyInjection \ParametersSchemaExtension ;
7
8
use PHPStan \DependencyInjection \RulesExtension ;
8
9
use PHPUnit \Framework \TestCase ;
9
10
use function sprintf ;
@@ -24,21 +25,25 @@ public function testExtensionNeon(): void
24
25
25
26
$ class = $ loader ->load (function (Compiler $ compiler ): void {
26
27
$ compiler ->addExtension ('rules ' , new RulesExtension ());
28
+ $ compiler ->addExtension ('parametersSchema ' , new ParametersSchemaExtension ());
27
29
$ compiler ->addConfig (['parameters ' => ['rootDir ' => __DIR__ ]]);
28
30
$ compiler ->loadConfig (__DIR__ . '/../../extension.neon ' );
29
31
$ compiler ->loadConfig (__DIR__ . '/config.neon ' );
30
32
}, $ key );
31
33
/** @var \Nette\DI\Container $container */
32
34
$ container = new $ class ();
33
35
36
+ $ parameters = $ container ->getParameters ();
37
+ unset($ parameters ['__parametersSchema ' ]);
38
+
34
39
self ::assertSame ([
35
40
'rootDir ' => __DIR__ ,
36
41
'symfony ' => [
37
42
'container_xml_path ' => __DIR__ . '/container.xml ' ,
38
43
'constant_hassers ' => true ,
39
44
'console_application_loader ' => null ,
40
45
],
41
- ], $ container -> getParameters () );
46
+ ], $ parameters );
42
47
43
48
self ::assertCount (6 , $ container ->findByTag ('phpstan.rules.rule ' ));
44
49
self ::assertCount (11 , $ container ->findByTag ('phpstan.broker.dynamicMethodReturnTypeExtension ' ));
0 commit comments