These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Kunstmaan\LeadGenerationBundle\Tests\DependencyInjection; |
||
4 | |||
5 | use Kunstmaan\LeadGenerationBundle\DependencyInjection\KunstmaanLeadGenerationExtension; |
||
6 | use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase; |
||
7 | use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; |
||
8 | |||
9 | /** |
||
10 | * Class KunstmaanLeadGenerationExtensionTest |
||
11 | */ |
||
12 | class KunstmaanLeadGenerationExtensionTest extends AbstractExtensionTestCase |
||
13 | { |
||
14 | /** |
||
15 | * @return ExtensionInterface[] |
||
0 ignored issues
–
show
|
|||
16 | */ |
||
17 | protected function getContainerExtensions() |
||
18 | { |
||
19 | return [new KunstmaanLeadGenerationExtension()]; |
||
20 | } |
||
21 | |||
22 | public function testCorrectParametersHaveBeenSet() |
||
23 | { |
||
24 | $this->load([ |
||
25 | 'popup_types' => ['abc'], |
||
26 | 'debug' => true, |
||
27 | ]); |
||
28 | |||
29 | $this->assertContainerBuilderHasParameter('kunstmaan_lead_generation.popup_types'); |
||
30 | $this->assertContainerBuilderHasParameter('kunstmaan_lead_generation.debug', true); |
||
31 | $this->assertContainerBuilderHasParameter('kunstmaan_lead_generation.popup.twig.extension.class', 'Kunstmaan\LeadGenerationBundle\Twig\PopupTwigExtension'); |
||
32 | $this->assertContainerBuilderHasParameter('kunstmaan_lead_generation.popup.manager.class', 'Kunstmaan\LeadGenerationBundle\Service\PopupManager'); |
||
33 | $this->assertContainerBuilderHasParameter('kunstmaan_lead_generation.menu.adaptor.class', 'Kunstmaan\LeadGenerationBundle\Service\MenuAdaptor'); |
||
34 | } |
||
35 | } |
||
36 |
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.