diff --git a/doctrine-mapping.xsd b/doctrine-mapping.xsd index 3a09f24b3..badd28f4f 100644 --- a/doctrine-mapping.xsd +++ b/doctrine-mapping.xsd @@ -63,7 +63,7 @@ - + diff --git a/tests/Doctrine/Tests/ORM/Mapping/XmlMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/XmlMappingDriverTest.php index 5c2edff5b..8308ea260 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/XmlMappingDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/XmlMappingDriverTest.php @@ -33,18 +33,27 @@ class XmlMappingDriverTest extends AbstractMappingDriverTest $this->assertEquals($expectedMap, $class->discriminatorMap); } - public function testValidateXmlSchema() + /** + * @param string $xmlMappingFile + * @dataProvider dataValidSchema + */ + public function testValidateXmlSchema($xmlMappingFile) { $xsdSchemaFile = __DIR__ . "/../../../../../doctrine-mapping.xsd"; $dom = new \DOMDocument('UTF-8'); - $dom->load(__DIR__ . "/xml/Doctrine.Tests.ORM.Mapping.CTI.dcm.xml"); - $this->assertTrue($dom->schemaValidate($xsdSchemaFile)); - - $dom = new \DOMDocument('UTF-8'); - $dom->load(__DIR__ . "/xml/Doctrine.Tests.ORM.Mapping.User.dcm.xml"); + $dom->load($xmlMappingFile); $this->assertTrue($dom->schemaValidate($xsdSchemaFile)); } + + static public function dataValidSchema() + { + return array( + array(__DIR__ . "/xml/Doctrine.Tests.ORM.Mapping.CTI.dcm.xml"), + array(__DIR__ . "/xml/Doctrine.Tests.ORM.Mapping.User.dcm.xml"), + array(__DIR__ . "/xml/CatNoId.dcm.xml"), + ); + } } class CTI diff --git a/tests/Doctrine/Tests/ORM/Mapping/xml/CatNoId.dcm.xml b/tests/Doctrine/Tests/ORM/Mapping/xml/CatNoId.dcm.xml new file mode 100644 index 000000000..6025d350f --- /dev/null +++ b/tests/Doctrine/Tests/ORM/Mapping/xml/CatNoId.dcm.xml @@ -0,0 +1,8 @@ + + + + +