Bladeren bron

Fixed sortable test

Lukas Botsch 14 jaren geleden
bovenliggende
commit
3ea901eec5

+ 1 - 1
tests/Gedmo/Sortable/Fixture/Category.php

@@ -7,7 +7,7 @@ use Doctrine\ORM\Mapping as ORM;
 use Doctrine\Common\Collections\ArrayCollection;
 
 /**
- * @Entity
+ * @ORM\Entity
  */
 class Category
 {

+ 1 - 1
tests/Gedmo/Sortable/Fixture/Item.php

@@ -6,7 +6,7 @@ use Gedmo\Mapping\Annotation as Gedmo;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
- * @Entity(repositoryClass="Gedmo\Sortable\Entity\Repository\SortableRepository")
+ * @ORM\Entity(repositoryClass="Gedmo\Sortable\Entity\Repository\SortableRepository")
  */
 class Item
 {

+ 1 - 1
tests/Gedmo/Sortable/Fixture/Node.php

@@ -6,7 +6,7 @@ use Gedmo\Mapping\Annotation as Gedmo;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
- * @Entity(repositoryClass="Gedmo\Sortable\Entity\Repository\SortableRepository")
+ * @ORM\Entity(repositoryClass="Gedmo\Sortable\Entity\Repository\SortableRepository")
  */
 class Node
 {

+ 1 - 6
tests/Gedmo/Sortable/SortableTest.php

@@ -27,13 +27,8 @@ class SortableTest extends BaseTestCaseORM
     {
         parent::setUp();
         
-        $annotationReader = new \Doctrine\Common\Annotations\AnnotationReader();
-        $annotationReader->setAutoloadAnnotations(true);
-        $sortable = new SortableListener;
-        $sortable->setAnnotationReader($annotationReader);
-        
         $evm = new EventManager;
-        $evm->addEventSubscriber($sortable);
+        $evm->addEventSubscriber(new SortableListener);
 
         $this->getMockSqliteEntityManager($evm);
         //$this->startQueryLog();