diff --git a/doctrine-mapping.xsd b/doctrine-mapping.xsd
index 89c11a894..f9c774d57 100644
--- a/doctrine-mapping.xsd
+++ b/doctrine-mapping.xsd
@@ -37,6 +37,7 @@
+
@@ -86,8 +87,11 @@
+
+
+
+
-
@@ -95,14 +99,14 @@
-
+
-
+
@@ -127,20 +131,24 @@
+
-
-
-
+
+
+
+
+
+
+
-
@@ -155,6 +163,7 @@
+
@@ -221,6 +230,7 @@
+
@@ -380,7 +390,7 @@
-
+
@@ -505,7 +515,7 @@
-
+
@@ -521,16 +531,33 @@
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/Doctrine/Tests/ORM/Mapping/XmlMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/XmlMappingDriverTest.php
index e69f23a35..42b871f1e 100644
--- a/tests/Doctrine/Tests/ORM/Mapping/XmlMappingDriverTest.php
+++ b/tests/Doctrine/Tests/ORM/Mapping/XmlMappingDriverTest.php
@@ -66,23 +66,32 @@ class XmlMappingDriverTest extends AbstractMappingDriverTest
/**
* @param string $xmlMappingFile
* @dataProvider dataValidSchema
+ * @group DDC-2429
*/
public function testValidateXmlSchema($xmlMappingFile)
{
- $xsdSchemaFile = __DIR__ . "/../../../../../doctrine-mapping.xsd";
+ $xsdSchemaFile = __DIR__ . '/../../../../../doctrine-mapping.xsd';
+ $dom = new \DOMDocument('UTF-8');
- $dom = new \DOMDocument('UTF-8');
$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"),
+ $list = glob(__DIR__ . '/xml/*.xml');
+ $invalid = array(
+ 'Doctrine.Tests.Models.DDC889.DDC889Class.dcm'
);
+
+ $list = array_filter($list, function($item) use ($invalid){
+ return ! in_array(pathinfo($item, PATHINFO_FILENAME), $invalid);
+ });
+
+ return array_map(function($item){
+ return array($item);
+ }, $list);
}
/**
diff --git a/tests/Doctrine/Tests/ORM/Mapping/xml/DDC2429Book.orm.xml b/tests/Doctrine/Tests/ORM/Mapping/xml/DDC2429Book.orm.xml
new file mode 100644
index 000000000..8640c6f51
--- /dev/null
+++ b/tests/Doctrine/Tests/ORM/Mapping/xml/DDC2429Book.orm.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/Doctrine/Tests/ORM/Mapping/xml/DDC2429Novel.orm.xml b/tests/Doctrine/Tests/ORM/Mapping/xml/DDC2429Novel.orm.xml
new file mode 100644
index 000000000..43ce94285
--- /dev/null
+++ b/tests/Doctrine/Tests/ORM/Mapping/xml/DDC2429Novel.orm.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.CMS.CmsAddress.dcm.xml b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.CMS.CmsAddress.dcm.xml
index b35569ae4..7e7bd5aaa 100644
--- a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.CMS.CmsAddress.dcm.xml
+++ b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.CMS.CmsAddress.dcm.xml
@@ -1,12 +1,10 @@
-
-
-
-
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
+ http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
+
+
@@ -15,7 +13,7 @@
SELECT id, country, city FROM cms_addresses
-
+
SELECT * FROM cms_addresses WHERE id = ?
@@ -46,7 +44,7 @@
-
+
@@ -54,6 +52,7 @@
-
+
+
\ No newline at end of file
diff --git a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.CMS.CmsUser.dcm.xml b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.CMS.CmsUser.dcm.xml
index 64a545df6..122a45e6f 100644
--- a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.CMS.CmsUser.dcm.xml
+++ b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.CMS.CmsUser.dcm.xml
@@ -15,7 +15,7 @@
SELECT id, username FROM cms_users WHERE username = ?
-
+
SELECT * FROM cms_users WHERE username = ?
@@ -90,20 +90,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -117,12 +104,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -133,7 +133,7 @@
-
+
diff --git a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.Company.CompanyPerson.dcm.xml b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.Company.CompanyPerson.dcm.xml
index c573504e0..2ddd88a32 100644
--- a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.Company.CompanyPerson.dcm.xml
+++ b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.Company.CompanyPerson.dcm.xml
@@ -7,6 +7,12 @@
+
+
+
+
+
+
SELECT id, name, discr FROM company_persons ORDER BY name
@@ -26,12 +32,6 @@
-
-
-
-
-
-
diff --git a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.DDC117.DDC117Translation.dcm.xml b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.DDC117.DDC117Translation.dcm.xml
index c0df0886a..ec3bc74fd 100644
--- a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.DDC117.DDC117Translation.dcm.xml
+++ b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.DDC117.DDC117Translation.dcm.xml
@@ -5,18 +5,19 @@
http://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.Animal.dcm.xml b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.Animal.dcm.xml
index 3f67a6b82..a4c4e9bfd 100644
--- a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.Animal.dcm.xml
+++ b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.Animal.dcm.xml
@@ -4,11 +4,11 @@
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
http://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
+
-
diff --git a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.DDC807Entity.dcm.xml b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.DDC807Entity.dcm.xml
index 3dc9135c5..82711dc2f 100644
--- a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.DDC807Entity.dcm.xml
+++ b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.DDC807Entity.dcm.xml
@@ -5,16 +5,16 @@
http://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
-
-
-
-
+
+
+
+
\ No newline at end of file