Code Duplication    Length = 14-17 lines in 2 locations

Tests/DependencyInjection/SWPUpdaterExtensionTest.php 2 locations

@@ 87-100 (lines=14) @@
84
     * @covers SWP\UpdaterBundle\DependencyInjection\SWPUpdaterExtension::load
85
     * @covers SWP\UpdaterBundle\DependencyInjection\SWPUpdaterExtension::<private>
86
     */
87
    public function testLoadIfMonologChannelDefined()
88
    {
89
        $container = $this->createContainer();
90
        $loader = $this->createLoader();
91
        $config = $this->getConfig();
92
        $tempConfig = array(
93
            'version_class' => 'Acme\DemoBundle\Version\Version',
94
            'monolog_channel' => true,
95
        );
96
97
        $loader->load(array(array_merge($config, $tempConfig)), $container);
98
        $this->assertTrue($container->hasParameter('swp_updater.monolog_channel'));
99
        $this->assertTrue($container->getParameter('swp_updater.monolog_channel'));
100
    }
101
102
    /**
103
     * @covers SWP\UpdaterBundle\DependencyInjection\SWPUpdaterExtension::load
@@ 184-200 (lines=17) @@
181
     * @covers SWP\UpdaterBundle\DependencyInjection\SWPUpdaterExtension::load
182
     * @covers SWP\UpdaterBundle\DependencyInjection\SWPUpdaterExtension::<private>
183
     */
184
    public function testLoadForDefaultClient()
185
    {
186
        $container = $this->createContainer();
187
        $loader = $this->createLoader();
188
        $config = $this->getConfig();
189
        $tempConfig = array(
190
            'client' => array(
191
                'base_uri' => 'http://example.com',
192
            ),
193
        );
194
195
        $loader->load(array(array_merge($config, $tempConfig)), $container);
196
        $this->assertEquals(
197
            $container->getDefinition('swp_updater.client')->getClass(),
198
            "SWP\UpdaterBundle\Client\DefaultClient"
199
        );
200
    }
201
202
    protected function createLoader()
203
    {