Code Duplication    Length = 18-19 lines in 2 locations

Tests/DependencyInjection/Factory/Loader/FileSystemLoaderFactoryTest.php 1 location

@@ 34-51 (lines=18) @@
31
        $this->assertEquals('filesystem', $loader->getName());
32
    }
33
34
    public function testCreateLoaderDefinitionOnCreate()
35
    {
36
        $container = new ContainerBuilder();
37
38
        $loader = new FileSystemLoaderFactory();
39
40
        $loader->create($container, 'theLoaderName', array(
41
            'data_root' => 'theDataRoot',
42
        ));
43
44
        $this->assertTrue($container->hasDefinition('liip_imagine.binary.loader.theloadername'));
45
46
        $loaderDefinition = $container->getDefinition('liip_imagine.binary.loader.theloadername');
47
        $this->assertInstanceOf('Symfony\Component\DependencyInjection\DefinitionDecorator', $loaderDefinition);
48
        $this->assertEquals('liip_imagine.binary.loader.prototype.filesystem', $loaderDefinition->getParent());
49
50
        $this->assertEquals('theDataRoot', $loaderDefinition->getArgument(2));
51
    }
52
53
    public function testProcessCorrectlyOptionsOnAddConfiguration()
54
    {

Tests/DependencyInjection/Factory/Loader/FlysystemLoaderFactoryTest.php 1 location

@@ 46-64 (lines=19) @@
43
        $this->assertEquals('flysystem', $loader->getName());
44
    }
45
46
    public function testCreateLoaderDefinitionOnCreate()
47
    {
48
        $container = new ContainerBuilder();
49
50
        $loader = new FlysystemLoaderFactory();
51
52
        $loader->create($container, 'theLoaderName', array(
53
            'filesystem_service' => 'flyfilesystemservice',
54
        ));
55
56
        $this->assertTrue($container->hasDefinition('liip_imagine.binary.loader.theloadername'));
57
58
        $loaderDefinition = $container->getDefinition('liip_imagine.binary.loader.theloadername');
59
        $this->assertInstanceOf('Symfony\Component\DependencyInjection\DefinitionDecorator', $loaderDefinition);
60
        $this->assertEquals('liip_imagine.binary.loader.prototype.flysystem', $loaderDefinition->getParent());
61
62
        $reference = $loaderDefinition->getArgument(1);
63
        $this->assertEquals('flyfilesystemservice', "$reference");
64
    }
65
66
    /**
67
     * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException