Tests/Services/DocumentServiceTest.php
changeset 67 989d9e117586
parent 65 ba6b8e38d90e
child 80 cf6a88559482
--- a/Tests/Services/DocumentServiceTest.php	Mon Dec 19 18:15:42 2011 +0100
+++ b/Tests/Services/DocumentServiceTest.php	Mon Dec 26 22:53:50 2011 +0100
@@ -61,6 +61,18 @@
         
         
     }
+    
+    public function testTagOrder()
+    {
+        $doc = $this->getDoctrine()->getRepository("WikiTagBundle:Document")->findOneByTitle("Title 1");
+        
+        $this->assertNotNull($doc);
+        $i = 1;
+        foreach($doc->getTags() as $dt) {
+            $this->assertEquals($i++, $dt->getTagOrder());
+        }
+        
+    }
 
     public function testUpdate()
     {
@@ -119,7 +131,7 @@
         
         $doc = $this->getDoctrine()->getRepository("WikiTagBundle:Document")->findOneByExternalId($hostdocid);
         
-        //$this->assertNull($doc);
+        $this->assertTrue(is_null($doc));
         
     }
     
@@ -164,7 +176,7 @@
         $this->runConsole("doctrine:schema:drop", array("--force" => true));
         $this->runConsole("wikitag:schema:create");
         $this->runConsole("cache:warmup");
-        $this->runConsole("doctrine:fixtures:load", array("--fixtures" => __DIR__ . "/../../../../../../../src/Company/BaseBundle/DataFixtures"));
+        $this->runConsole("doctrine:fixtures:load"/*, array("--fixtures" => __DIR__ . "/../../../../../../../src/Company/BaseBundle/DataFixtures")*/);
     }
     
     protected function runConsole($command, Array $options = array())