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