From 3f942e05f36ced89d9108e27b30b053737a49aab Mon Sep 17 00:00:00 2001 From: Vitali Date: Sun, 20 Nov 2011 15:35:58 +0300 Subject: [PATCH] Register annotations to make ClassMetadataFactoryTest pass alone --- tests/Doctrine/Tests/ORM/Mapping/ClassMetadataFactoryTest.php | 3 ++- tests/Doctrine/Tests/OrmTestCase.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataFactoryTest.php b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataFactoryTest.php index 00b8f5f16..4972f202d 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataFactoryTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataFactoryTest.php @@ -67,7 +67,8 @@ class ClassMetadataFactoryTest extends \Doctrine\Tests\OrmTestCase public function testHasGetMetadata_NamespaceSeperatorIsNotNormalized() { require_once __DIR__."/../../Models/Global/GlobalNamespaceModel.php"; - + \Doctrine\Common\Annotations\AnnotationRegistry::registerFile(__DIR__ . '/../../../../../lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php'); + $metadataDriver = $this->createAnnotationDriver(array(__DIR__ . '/../../Models/Global/')); $entityManager = $this->_createEntityManager($metadataDriver); diff --git a/tests/Doctrine/Tests/OrmTestCase.php b/tests/Doctrine/Tests/OrmTestCase.php index 2a7b37dc9..ebf77dead 100644 --- a/tests/Doctrine/Tests/OrmTestCase.php +++ b/tests/Doctrine/Tests/OrmTestCase.php @@ -17,7 +17,7 @@ abstract class OrmTestCase extends DoctrineTestCase /** * @param array $paths - * @return \Doctrine\Common\Annotations\AnnotationReader + * @return \Doctrine\ORM\Mapping\Driver\AnnotationDriver */ protected function createAnnotationDriver($paths = array(), $alias = null) {