diff --git a/tests/Doctrine/Tests/ORM/Tools/Export/XmlClassMetadataExporterTest.php b/tests/Doctrine/Tests/ORM/Tools/Export/XmlClassMetadataExporterTest.php
index a5e44dccb..0fe58b4ec 100644
--- a/tests/Doctrine/Tests/ORM/Tools/Export/XmlClassMetadataExporterTest.php
+++ b/tests/Doctrine/Tests/ORM/Tools/Export/XmlClassMetadataExporterTest.php
@@ -20,6 +20,9 @@
*/
namespace Doctrine\Tests\ORM\Tools\Export;
+use Doctrine\ORM\Mapping\ClassMetadataInfo;
+use Doctrine\ORM\Mapping\ClassMetadata;
+use Doctrine\ORM\Tools\Export\Driver\XmlExporter;
/**
* Test case for XmlClassMetadataExporterTest
@@ -38,10 +41,13 @@ class XmlClassMetadataExporterTest extends AbstractClassMetadataExporterTest
return 'xml';
}
-
+ /**
+ * @group DDC-3428
+ */
public function testSequenceGenerator() {
- $exporter = new \Doctrine\ORM\Tools\Export\Driver\XmlExporter();
- $metadata = new \Doctrine\ORM\Mapping\ClassMetadata('entityTest');
+ $exporter = new XmlExporter();
+ $metadata = new ClassMetadata('entityTest');
+
$metadata->mapField(array(
"fieldName" => 'id',
"type" => 'integer',
@@ -49,24 +55,29 @@ class XmlClassMetadataExporterTest extends AbstractClassMetadataExporterTest
"id" => true,
));
- $metadata->setIdGeneratorType(\Doctrine\ORM\Mapping\ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE);
+ $metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE);
$metadata->setSequenceGeneratorDefinition(array(
'sequenceName' => 'seq_entity_test_id',
'allocationSize' => 5,
'initialValue' => 1
));
+ $expectedFileContent = <<<'XML'
+
+
+
+
+
+
+
+
+
+XML;
- $fileContent = ''."\n".
-''."\n".
-' '."\n".
-' '."\n".
-' '."\n".
-' '."\n".
-' '."\n".
-' '."\n".
-''."\n";
- $exportClassMetadata = $exporter->exportClassMetadata($metadata);
- $this->assertEquals($fileContent, $exportClassMetadata);
+ $this->assertXmlStringEqualsXmlString($expectedFileContent, $exporter->exportClassMetadata($metadata));
}
}