fixed some more tests

This commit is contained in:
Johannes Schmitt 2011-05-19 23:15:41 +02:00
parent 6c0b0449a6
commit 98ed7dd030
6 changed files with 22 additions and 2 deletions

View File

@ -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());

View File

@ -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
{

View File

@ -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
{

View File

@ -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
{

View File

@ -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
{

View File

@ -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());