Code Duplication    Length = 22-22 lines in 2 locations

src/Kunstmaan/AdminBundle/Tests/unit/DependencyInjection/Compiler/AdminPanelCompilerPassTest.php 1 location

@@ 11-32 (lines=22) @@
8
use Symfony\Component\DependencyInjection\Definition;
9
use Symfony\Component\DependencyInjection\Reference;
10
11
class AdminPanelCompilerPassTest extends AbstractCompilerPassTestCase
12
{
13
    protected function registerCompilerPass(ContainerBuilder $container)
14
    {
15
        $container->addCompilerPass(new AdminPanelCompilerPass());
16
    }
17
18
    public function testContainerKeys()
19
    {
20
        $svc = new Definition();
21
        $svc->addTag('kunstmaan_admin.admin_panel.adaptor');
22
        $this->setDefinition('kunstmaan_admin.admin_panel', $svc);
23
24
        $this->compile();
25
26
        $this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
27
            'kunstmaan_admin.admin_panel',
28
            'addAdminPanelAdaptor',
29
            [new Reference('kunstmaan_admin.admin_panel'), 0]
30
        );
31
    }
32
}
33

src/Kunstmaan/AdminBundle/Tests/unit/DependencyInjection/Compiler/MenuCompilerPassTest.php 1 location

@@ 11-32 (lines=22) @@
8
use Symfony\Component\DependencyInjection\Definition;
9
use Symfony\Component\DependencyInjection\Reference;
10
11
class MenuCompilerPassTest extends AbstractCompilerPassTestCase
12
{
13
    protected function registerCompilerPass(ContainerBuilder $container)
14
    {
15
        $container->addCompilerPass(new MenuCompilerPass());
16
    }
17
18
    public function testContainerKeys()
19
    {
20
        $svc = new Definition();
21
        $svc->addTag('kunstmaan_admin.menu.adaptor');
22
        $this->setDefinition('kunstmaan_admin.menubuilder', $svc);
23
24
        $this->compile();
25
26
        $this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
27
            'kunstmaan_admin.menubuilder',
28
            'addAdaptMenu',
29
            [new Reference('kunstmaan_admin.menubuilder'), 0]
30
        );
31
    }
32
}
33