Code Duplication    Length = 11-12 lines in 2 locations

Tests/Command/ImportMappingDoctrineCommandTest.php 2 locations

@@ 82-92 (lines=11) @@
79
        $this->commandTester->execute(['name' => 'Some\Namespace']);
80
    }
81
82
    public function testExecuteXmlWithNamespace()
83
    {
84
        $this->commandTester->execute([
85
            'name' => 'Some\Namespace\Entity',
86
            '--path' => $this->kernel->getProjectDir() . '/config/doctrine',
87
        ]);
88
89
        $expectedMetadataPath = $this->kernel->getProjectDir() . '/config/doctrine/Product.orm.xml';
90
        $this->assertFileExists($expectedMetadataPath);
91
        $this->assertContains('"Some\Namespace\Entity\Product"', file_get_contents($expectedMetadataPath), 'Metadata contains correct namespace');
92
    }
93
94
    public function testExecuteAnnotationsWithNamespace()
95
    {
@@ 94-105 (lines=12) @@
91
        $this->assertContains('"Some\Namespace\Entity\Product"', file_get_contents($expectedMetadataPath), 'Metadata contains correct namespace');
92
    }
93
94
    public function testExecuteAnnotationsWithNamespace()
95
    {
96
        $this->commandTester->execute([
97
            'name' => 'Some\Namespace\Entity',
98
            '--path' => $this->kernel->getProjectDir() . '/src/Entity',
99
            'mapping-type' => 'annotation',
100
        ]);
101
102
        $expectedMetadataPath = $this->kernel->getProjectDir() . '/src/Entity/Product.php';
103
        $this->assertFileExists($expectedMetadataPath);
104
        $this->assertContains('namespace Some\Namespace\Entity;', file_get_contents($expectedMetadataPath), 'Metadata contains correct namespace');
105
    }
106
}
107
108
class ImportMappingTestingKernel extends Kernel