Bläddra i källkod

[sortable] updated xml mapping

gediminasm 13 år sedan
förälder
incheckning
07c3262700

+ 2 - 7
schemas/orm/doctrine-extensions-mapping-2-2.xsd

@@ -35,14 +35,9 @@ people to push their own additional attributes/elements into the same field elem
   <xs:element name="tree-right" type="gedmo:emptyType"/>
   <xs:element name="tree-level" type="gedmo:emptyType"/>
   <xs:element name="tree-root" type="gedmo:emptyType"/>
-  <!-- many-to-one -->
-  <!-- xs:element name="versioned" type="gedmo:emptyType"/-->
   <xs:element name="tree-parent" type="gedmo:emptyType"/>
-  <!-- one-to-one -->
-  <!-- same as many-to-one
-  <xs:element name="versioned" type="gedmo:emptyType"/>
-  <xs:element name="tree-parent" type="gedmo:emptyType"/>
-  -->
+  <xs:element name="sortable-group" type="gedmo:emptyType"/>
+  <xs:element name="sortable-position" type="gedmo:emptyType"/>
 
   <xs:complexType name="translation">
     <xs:attribute name="entity" type="xs:string" use="optional" />

+ 1 - 3
tests/Gedmo/Mapping/Driver/Xml/Mapping.Fixture.Xml.Sortable.dcm.xml

@@ -7,9 +7,7 @@
             <generator strategy="AUTO"/>
         </id>
 
-        <field name="title" type="string" length="128">
-            <gedmo:sluggable position="0"/>
-        </field>
+        <field name="title" type="string" length="128"/>
         <field name="position" type="integer">
             <gedmo:sortable-position/>
         </field>

+ 7 - 6
tests/Gedmo/Tool/BaseTestCaseOM.php

@@ -52,12 +52,7 @@ abstract class BaseTestCaseOM extends \PHPUnit_Framework_TestCase
      */
     protected function setUp()
     {
-        if (!class_exists('Mongo')) {
-            $this->markTestSkipped('Missing Mongo extension.');
-        }
-        if (version_compare(\Doctrine\Common\Version::VERSION, '2.2.0-DEV', '>=')) {
-            $this->markTestSkipped('ODM does not support version 2.2 of doctrine common.');
-        }
+
     }
 
     /**
@@ -88,6 +83,12 @@ abstract class BaseTestCaseOM extends \PHPUnit_Framework_TestCase
      */
     protected function getMockDocumentManager($dbName, MappingDriverODM $mappingDriver = null)
     {
+        if (!class_exists('Mongo')) {
+            $this->markTestSkipped('Missing Mongo extension.');
+        }
+        if (version_compare(\Doctrine\Common\Version::VERSION, '2.2.0-DEV', '>=')) {
+            $this->markTestSkipped('ODM does not support version 2.2 of doctrine common.');
+        }
         $conn = new Connection;
         $config = $this->getMockAnnotatedODMMongoDBConfig($dbName, $mappingDriver);