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\UtilitiesBundle\Tests\DependencyInjection; |
||
4 | |||
5 | use Kunstmaan\UtilitiesBundle\DependencyInjection\KunstmaanUtilitiesExtension; |
||
6 | use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase; |
||
7 | use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; |
||
8 | |||
9 | /** |
||
10 | * Class KunstmaanUtilitiesExtensionTest |
||
11 | */ |
||
12 | class KunstmaanUtilitiesExtensionTest extends AbstractExtensionTestCase |
||
13 | { |
||
14 | /** |
||
15 | * @return ExtensionInterface[] |
||
0 ignored issues
–
show
|
|||
16 | */ |
||
17 | protected function getContainerExtensions() |
||
18 | { |
||
19 | return [new KunstmaanUtilitiesExtension()]; |
||
20 | } |
||
21 | |||
22 | public function testCorrectDefaultParametersHaveBeenSet() |
||
23 | { |
||
24 | $this->load(); |
||
25 | |||
26 | $this->assertContainerBuilderHasParameter('kunstmaan_utilities.cipher.secret', '%kernel.secret%'); |
||
27 | } |
||
28 | |||
29 | public function testParameterWithSecretParameter() |
||
30 | { |
||
31 | $this->setParameter('secret', 'testvalue'); |
||
32 | |||
33 | $this->load(); |
||
34 | |||
35 | $this->assertContainerBuilderHasParameter('kunstmaan_utilities.cipher.secret', 'testvalue'); |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * @group legacy |
||
40 | * @expectedDeprecation Setting the "kunstmaan_utilities.cipher.secret" parameter is deprecated since KunstmaanUtilitiesBundle 5.2, this value will be ignored/overwritten in KunstmaanUtilitiesBundle 6.0. Use the "kunstmaan_utilities.cipher.secret" config instead if you want to set a different value than the default "%kernel.secret%". |
||
41 | */ |
||
42 | public function testLegacyParameterSecretParameter() |
||
43 | { |
||
44 | $this->setParameter('kunstmaan_utilities.cipher.secret', 'testvalue'); |
||
45 | |||
46 | $this->load(); |
||
47 | |||
48 | $this->assertContainerBuilderHasParameter('kunstmaan_utilities.cipher.secret', 'testvalue'); |
||
49 | } |
||
50 | } |
||
51 |
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.