From c8e4e7e7abce0546f94f4813f65e6e0b631d66e5 Mon Sep 17 00:00:00 2001 From: guilhermeblanco Date: Sat, 13 Sep 2008 06:34:47 +0000 Subject: [PATCH] Small changes to get Query tests running again. Fixed wrong DQL in IdentifierRecognitionTest.php --- tests/Orm/Query/IdentifierRecognitionTest.php | 4 ++-- tests/lib/Doctrine_OrmTestCase.php | 9 +++++---- tests/lib/mocks/Doctrine_DriverMock.php | 5 +++++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/Orm/Query/IdentifierRecognitionTest.php b/tests/Orm/Query/IdentifierRecognitionTest.php index 9fd4c3285..da17737d7 100755 --- a/tests/Orm/Query/IdentifierRecognitionTest.php +++ b/tests/Orm/Query/IdentifierRecognitionTest.php @@ -70,7 +70,7 @@ class Orm_Query_IdentifierRecognitionTest extends Doctrine_OrmTestCase public function testQueryParserSupportsMultipleAliasDeclarations() { $entityManager = $this->_em; - $query = $entityManager->createQuery('SELECT u.* FROM CmsUser u INDEX BY id LEFT JOIN u.phonenumbers p'); + $query = $entityManager->createQuery('SELECT u.* FROM CmsUser u INDEX BY u.id LEFT JOIN u.phonenumbers p'); $parserResult = $query->parse(); $decl = $parserResult->getQueryComponent('u'); @@ -94,7 +94,7 @@ class Orm_Query_IdentifierRecognitionTest extends Doctrine_OrmTestCase public function testQueryParserSupportsMultipleAliasDeclarationsWithIndexBy() { $entityManager = $this->_em; - $query = $entityManager->createQuery('SELECT u.* FROM CmsUser u INDEX BY id LEFT JOIN u.articles a INNER JOIN u.phonenumbers pn INDEX BY phonenumber'); + $query = $entityManager->createQuery('SELECT u.* FROM CmsUser u INDEX BY u.id LEFT JOIN u.articles a INNER JOIN u.phonenumbers pn INDEX BY pn.phonenumber'); $parserResult = $query->parse(); $decl = $parserResult->getQueryComponent('u'); diff --git a/tests/lib/Doctrine_OrmTestCase.php b/tests/lib/Doctrine_OrmTestCase.php index 021f4b2ab..48ca6a756 100644 --- a/tests/lib/Doctrine_OrmTestCase.php +++ b/tests/lib/Doctrine_OrmTestCase.php @@ -1,6 +1,7 @@ sharedFixture['em'])) { $this->_em = $this->sharedFixture['em']; - } else { - $config = new Doctrine_Configuration(); - $eventManager = new Doctrine_EventManager(); + } else { + $config = new Doctrine_Common_Configuration(); + $eventManager = new Doctrine_Common_EventManager(); $connectionOptions = array( 'driverClass' => 'Doctrine_DriverMock', 'wrapperClass' => 'Doctrine_ConnectionMock', diff --git a/tests/lib/mocks/Doctrine_DriverMock.php b/tests/lib/mocks/Doctrine_DriverMock.php index c30229a3a..91e29916a 100644 --- a/tests/lib/mocks/Doctrine_DriverMock.php +++ b/tests/lib/mocks/Doctrine_DriverMock.php @@ -1,5 +1,10 @@