Code Duplication    Length = 11-12 lines in 2 locations

Tests/Command/ImportMappingDoctrineCommandTest.php 2 locations

@@ 97-107 (lines=11) @@
94
        $this->commandTester->execute(['name' => 'Some\Namespace']);
95
    }
96
97
    public function testExecuteXmlWithNamespace() : void
98
    {
99
        $this->commandTester->execute([
100
            'name' => 'Some\Namespace\Entity',
101
            '--path' => $this->kernel->getProjectDir() . '/config/doctrine',
102
        ]);
103
104
        $expectedMetadataPath = $this->kernel->getProjectDir() . '/config/doctrine/Product.orm.xml';
105
        $this->assertFileExists($expectedMetadataPath);
106
        $this->assertContains('"Some\Namespace\Entity\Product"', file_get_contents($expectedMetadataPath), 'Metadata contains correct namespace');
107
    }
108
109
    public function testExecuteAnnotationsWithNamespace() : void
110
    {
@@ 109-120 (lines=12) @@
106
        $this->assertContains('"Some\Namespace\Entity\Product"', file_get_contents($expectedMetadataPath), 'Metadata contains correct namespace');
107
    }
108
109
    public function testExecuteAnnotationsWithNamespace() : void
110
    {
111
        $this->commandTester->execute([
112
            'name' => 'Some\Namespace\Entity',
113
            '--path' => $this->kernel->getProjectDir() . '/src/Entity',
114
            'mapping-type' => 'annotation',
115
        ]);
116
117
        $expectedMetadataPath = $this->kernel->getProjectDir() . '/src/Entity/Product.php';
118
        $this->assertFileExists($expectedMetadataPath);
119
        $this->assertContains('namespace Some\Namespace\Entity;', file_get_contents($expectedMetadataPath), 'Metadata contains correct namespace');
120
    }
121
}
122
123
class ImportMappingTestFooBundle extends Bundle