Quellcode durchsuchen

fixed some more tests

Johannes Schmitt vor 14 Jahren
Ursprung
Commit
98ed7dd030

+ 3 - 1
src/Symfony/Bundle/DoctrineBundle/Tests/TestCase.php

@@ -11,6 +11,8 @@
 
 namespace Symfony\Bundle\DoctrineBundle\Tests;
 
+use Symfony\Bundle\DoctrineBundle\Annotations\IndexedReader;
+
 use Doctrine\Common\Annotations\AnnotationReader;
 use Doctrine\ORM\Mapping\Driver\AnnotationDriver;
 use Doctrine\ORM\EntityManager;
@@ -38,7 +40,7 @@ class TestCase extends \PHPUnit_Framework_TestCase
         $config->setAutoGenerateProxyClasses(true);
         $config->setProxyDir(\sys_get_temp_dir());
         $config->setProxyNamespace('SymfonyTests\Doctrine');
-        $config->setMetadataDriverImpl(new AnnotationDriver(new AnnotationReader()));
+        $config->setMetadataDriverImpl(new AnnotationDriver(new IndexedReader(new AnnotationReader()), $paths));
         $config->setQueryCacheImpl(new \Doctrine\Common\Cache\ArrayCache());
         $config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache());
 

+ 4 - 0
tests/Symfony/Tests/Bridge/Doctrine/Fixtures/CompositeIdentEntity.php

@@ -2,6 +2,10 @@
 
 namespace Symfony\Tests\Bridge\Doctrine\Form\Fixtures;
 
+use Doctrine\ORM\Mapping\Id;
+use Doctrine\ORM\Mapping\Column;
+use Doctrine\ORM\Mapping\Entity;
+
 /** @Entity */
 class CompositeIdentEntity
 {

+ 4 - 0
tests/Symfony/Tests/Bridge/Doctrine/Fixtures/CompositeStringIdentEntity.php

@@ -2,6 +2,10 @@
 
 namespace Symfony\Tests\Bridge\Doctrine\Form\Fixtures;
 
+use Doctrine\ORM\Mapping\Id;
+use Doctrine\ORM\Mapping\Column;
+use Doctrine\ORM\Mapping\Entity;
+
 /** @Entity */
 class CompositeStringIdentEntity
 {

+ 4 - 0
tests/Symfony/Tests/Bridge/Doctrine/Fixtures/SingleIdentEntity.php

@@ -2,6 +2,10 @@
 
 namespace Symfony\Tests\Bridge\Doctrine\Form\Fixtures;
 
+use Doctrine\ORM\Mapping\Id;
+use Doctrine\ORM\Mapping\Column;
+use Doctrine\ORM\Mapping\Entity;
+
 /** @Entity */
 class SingleIdentEntity
 {

+ 4 - 0
tests/Symfony/Tests/Bridge/Doctrine/Fixtures/SingleStringIdentEntity.php

@@ -2,6 +2,10 @@
 
 namespace Symfony\Tests\Bridge\Doctrine\Form\Fixtures;
 
+use Doctrine\ORM\Mapping\Id;
+use Doctrine\ORM\Mapping\Column;
+use Doctrine\ORM\Mapping\Entity;
+
 /** @Entity */
 class SingleStringIdentEntity
 {

+ 3 - 1
tests/Symfony/Tests/Bridge/Doctrine/Form/DoctrineOrmTestCase.php

@@ -11,6 +11,8 @@
 
 namespace Symfony\Tests\Bridge\Doctrine\Form;
 
+use Symfony\Bundle\DoctrineBundle\Annotations\IndexedReader;
+
 use Doctrine\Common\Annotations\AnnotationReader;
 
 use Doctrine\ORM\Mapping\Driver\AnnotationDriver;
@@ -36,7 +38,7 @@ abstract class DoctrineOrmTestCase extends \PHPUnit_Framework_TestCase
         $config->setAutoGenerateProxyClasses(true);
         $config->setProxyDir(\sys_get_temp_dir());
         $config->setProxyNamespace('SymfonyTests\Doctrine');
-        $config->setMetadataDriverImpl(new AnnotationDriver(new AnnotationReader()));
+        $config->setMetadataDriverImpl(new AnnotationDriver(new IndexedReader(new AnnotationReader())));
         $config->setQueryCacheImpl(new \Doctrine\Common\Cache\ArrayCache());
         $config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache());