Code Duplication    Length = 10-11 lines in 2 locations

Tests/Command/ImportMappingDoctrineCommandTest.php 2 locations

@@ 53-62 (lines=10) @@
50
        $fs->remove(sys_get_temp_dir().'/import_mapping_bundle');
51
    }
52
53
    public function testExecuteXmlWithBundle()
54
    {
55
        $this->commandTester->execute([
56
            'name' => 'ImportMappingTestFooBundle',
57
        ]);
58
59
        $expectedMetadataPath = sys_get_temp_dir().'/import_mapping_bundle/Resources/config/doctrine/Product.orm.xml';
60
        $this->assertFileExists($expectedMetadataPath);
61
        $this->assertContains('"Doctrine\Bundle\DoctrineBundle\Tests\Command\Entity\Product"', file_get_contents($expectedMetadataPath), 'Metadata contains correct namespace');
62
    }
63
64
    public function testExecuteAnnotationsWithBundle()
65
    {
@@ 64-74 (lines=11) @@
61
        $this->assertContains('"Doctrine\Bundle\DoctrineBundle\Tests\Command\Entity\Product"', file_get_contents($expectedMetadataPath), 'Metadata contains correct namespace');
62
    }
63
64
    public function testExecuteAnnotationsWithBundle()
65
    {
66
        $this->commandTester->execute([
67
            'name' => 'ImportMappingTestFooBundle',
68
            'mapping-type' => 'annotation',
69
        ]);
70
71
        $expectedMetadataPath = sys_get_temp_dir().'/import_mapping_bundle/Entity/Product.php';
72
        $this->assertFileExists($expectedMetadataPath);
73
        $this->assertContains('namespace Doctrine\Bundle\DoctrineBundle\Tests\Command\Entity;', file_get_contents($expectedMetadataPath), 'File contains correct namespace');
74
    }
75
76
    /**
77
     * @expectedException \InvalidArgumentException