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\AdminBundle\Tests\DependencyInjection; |
||
4 | |||
5 | use Kunstmaan\AdminBundle\DependencyInjection\KunstmaanAdminExtension; |
||
6 | use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; |
||
7 | use Kunstmaan\AdminBundle\Tests\unit\AbstractPrependableExtensionTestCase; |
||
8 | |||
9 | /** |
||
10 | * Class KunstmaanAdminExtensionTest |
||
11 | */ |
||
12 | class KunstmaanAdminExtensionTest extends AbstractPrependableExtensionTestCase |
||
13 | { |
||
14 | /** |
||
15 | * @return ExtensionInterface[] |
||
0 ignored issues
–
show
|
|||
16 | */ |
||
17 | protected function getContainerExtensions() |
||
18 | { |
||
19 | return [new KunstmaanAdminExtension()]; |
||
20 | } |
||
21 | |||
22 | |||
23 | public function testCorrectParametersHaveBeenSet() |
||
24 | { |
||
25 | $this->container->setParameter('kernel.logs_dir', '/somewhere/over/the/rainbow'); |
||
26 | $this->container->setParameter('kernel.environment', 'staging'); |
||
27 | $this->load([ |
||
28 | 'dashboard_route' => true, |
||
29 | 'admin_password' => 'omgchangethis', |
||
30 | 'menu_items' => [ |
||
31 | [ |
||
32 | 'route' => 'route66', |
||
33 | 'label' => 'Route 66', |
||
34 | ], |
||
35 | ], |
||
36 | ]); |
||
37 | |||
38 | $this->assertContainerBuilderHasParameter('version_checker.url', 'https://bundles.kunstmaan.be/version-check'); |
||
39 | $this->assertContainerBuilderHasParameter('version_checker.timeframe', (60 * 60 * 24)); |
||
40 | $this->assertContainerBuilderHasParameter('kunstmaan_admin.admin_locales'); |
||
41 | $this->assertContainerBuilderHasParameter('kunstmaan_admin.default_admin_locale'); |
||
42 | $this->assertContainerBuilderHasParameter('kunstmaan_admin.session_security.ip_check'); |
||
43 | $this->assertContainerBuilderHasParameter('kunstmaan_admin.session_security.user_agent_check'); |
||
44 | $this->assertContainerBuilderHasParameter('kunstmaan_admin.google_signin.enabled'); |
||
45 | $this->assertContainerBuilderHasParameter('kunstmaan_admin.google_signin.client_id'); |
||
46 | $this->assertContainerBuilderHasParameter('kunstmaan_admin.google_signin.client_secret'); |
||
47 | $this->assertContainerBuilderHasParameter('kunstmaan_admin.google_signin.hosted_domains'); |
||
48 | } |
||
49 | } |
||
50 |
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.