diff --git a/tests/Doctrine/Tests/ORM/Tools/Export/XmlClassMetadataExporterTest.php b/tests/Doctrine/Tests/ORM/Tools/Export/XmlClassMetadataExporterTest.php index 0fe58b4ec..c9c3570b4 100644 --- a/tests/Doctrine/Tests/ORM/Tools/Export/XmlClassMetadataExporterTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/Export/XmlClassMetadataExporterTest.php @@ -76,6 +76,40 @@ class XmlClassMetadataExporterTest extends AbstractClassMetadataExporterTest +XML; + + $this->assertXmlStringEqualsXmlString($expectedFileContent, $exporter->exportClassMetadata($metadata)); + } + + /** + * @url https://github.com/doctrine/doctrine2/pull/1214 + */ + public function testFieldOptionsExport() { + $exporter = new XmlExporter(); + $metadata = new ClassMetadata('entityTest'); + + $metadata->mapField(array( + "fieldName" => 'myField', + "type" => 'string', + "columnName" => 'my_field', + "options" => array( + "default" => "default_string", + "comment" => "The comment for the field", + ), + )); + + $expectedFileContent = <<<'XML' + + + + + + + + + + + XML; $this->assertXmlStringEqualsXmlString($expectedFileContent, $exporter->exportClassMetadata($metadata));