Code Duplication    Length = 11-12 lines in 2 locations

Tests/Command/ImportMappingDoctrineCommandTest.php 2 locations

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