Code Duplication    Length = 11-11 lines in 5 locations

Tests/DependencyInjection/Compiler/ConfigurePrefixCandidatesCompilerPassTest.php 3 locations

@@ 69-79 (lines=11) @@
66
    /**
67
     * @covers SWP\MultiTenancyBundle\DependencyInjection\Compiler\ConfigurePrefixCandidatesCompilerPass::process
68
     */
69
    public function testProcessPHPCRBackendDisabled()
70
    {
71
        $this->container->expects($this->any())
72
            ->method('hasParameter')
73
            ->will($this->returnValueMap([
74
                ['swp_multi_tenancy.backend_type_phpcr', false],
75
                ['cmf_routing.backend_type_phpcr', true],
76
            ]));
77
78
        $this->assertNull($this->pass->process($this->container));
79
    }
80
81
    /**
82
     * @covers SWP\MultiTenancyBundle\DependencyInjection\Compiler\ConfigurePrefixCandidatesCompilerPass::process
@@ 84-94 (lines=11) @@
81
    /**
82
     * @covers SWP\MultiTenancyBundle\DependencyInjection\Compiler\ConfigurePrefixCandidatesCompilerPass::process
83
     */
84
    public function testProcessCMFBackendDisabled()
85
    {
86
        $this->container->expects($this->any())
87
            ->method('hasParameter')
88
            ->will($this->returnValueMap([
89
                ['swp_multi_tenancy.backend_type_phpcr', true],
90
                ['cmf_routing.backend_type_phpcr', false],
91
            ]));
92
93
        $this->assertNull($this->pass->process($this->container));
94
    }
95
96
    /**
97
     * @covers SWP\MultiTenancyBundle\DependencyInjection\Compiler\ConfigurePrefixCandidatesCompilerPass::process
@@ 99-109 (lines=11) @@
96
    /**
97
     * @covers SWP\MultiTenancyBundle\DependencyInjection\Compiler\ConfigurePrefixCandidatesCompilerPass::process
98
     */
99
    public function testProcessWithoutConfig()
100
    {
101
        $this->container->expects($this->any())
102
            ->method('hasParameter')
103
            ->will($this->returnValueMap([
104
                ['swp_multi_tenancy.backend_type_phpcr', false],
105
                ['cmf_routing.backend_type_phpcr', false],
106
            ]));
107
108
        $this->assertNull($this->pass->process($this->container));
109
    }
110
111
    /**
112
     * @expectedException Symfony\Component\DependencyInjection\Exception\RuntimeException

Tests/DependencyInjection/Compiler/TenantAwareRouterCompilerPassTest.php 2 locations

@@ 83-93 (lines=11) @@
80
    /**
81
     * @covers SWP\MultiTenancyBundle\DependencyInjection\Compiler\TenantAwareRouterCompilerPass::process
82
     */
83
    public function testProcessCMFBackendDisabled()
84
    {
85
        $this->container->expects($this->any())
86
            ->method('hasParameter')
87
            ->will($this->returnValueMap([
88
                ['swp_multi_tenancy.backend_type_phpcr', true],
89
                ['cmf_routing.backend_type_phpcr', false],
90
            ]));
91
92
        $this->assertNull($this->pass->process($this->container));
93
    }
94
95
    /**
96
     * @covers SWP\MultiTenancyBundle\DependencyInjection\Compiler\TenantAwareRouterCompilerPass::process
@@ 98-108 (lines=11) @@
95
    /**
96
     * @covers SWP\MultiTenancyBundle\DependencyInjection\Compiler\TenantAwareRouterCompilerPass::process
97
     */
98
    public function testProcessWithoutConfig()
99
    {
100
        $this->container->expects($this->any())
101
            ->method('hasParameter')
102
            ->will($this->returnValueMap([
103
                ['swp_multi_tenancy.backend_type_phpcr', false],
104
                ['cmf_routing.backend_type_phpcr', false],
105
            ]));
106
107
        $this->assertNull($this->pass->process($this->container));
108
    }
109
110
    /**
111
     * @expectedException Symfony\Component\DependencyInjection\Exception\RuntimeException