Code Duplication    Length = 10-11 lines in 2 locations

Tests/Command/ImportMappingDoctrineCommandTest.php 2 locations

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