Code Duplication    Length = 10-11 lines in 2 locations

Tests/Command/ImportMappingDoctrineCommandTest.php 2 locations

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