Small changes to get Query tests running again.
Fixed wrong DQL in IdentifierRecognitionTest.php
This commit is contained in:
parent
d4e554fb44
commit
c8e4e7e7ab
@ -70,7 +70,7 @@ class Orm_Query_IdentifierRecognitionTest extends Doctrine_OrmTestCase
|
|||||||
public function testQueryParserSupportsMultipleAliasDeclarations()
|
public function testQueryParserSupportsMultipleAliasDeclarations()
|
||||||
{
|
{
|
||||||
$entityManager = $this->_em;
|
$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();
|
$parserResult = $query->parse();
|
||||||
|
|
||||||
$decl = $parserResult->getQueryComponent('u');
|
$decl = $parserResult->getQueryComponent('u');
|
||||||
@ -94,7 +94,7 @@ class Orm_Query_IdentifierRecognitionTest extends Doctrine_OrmTestCase
|
|||||||
public function testQueryParserSupportsMultipleAliasDeclarationsWithIndexBy()
|
public function testQueryParserSupportsMultipleAliasDeclarationsWithIndexBy()
|
||||||
{
|
{
|
||||||
$entityManager = $this->_em;
|
$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();
|
$parserResult = $query->parse();
|
||||||
|
|
||||||
$decl = $parserResult->getQueryComponent('u');
|
$decl = $parserResult->getQueryComponent('u');
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once 'lib/mocks/Doctrine_DriverMock.php';
|
require_once 'lib/mocks/Doctrine_DriverMock.php';
|
||||||
|
require_once 'lib/mocks/Doctrine_ConnectionMock.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base testcase class for all orm testcases.
|
* Base testcase class for all orm testcases.
|
||||||
@ -10,13 +11,13 @@ class Doctrine_OrmTestCase extends Doctrine_TestCase
|
|||||||
{
|
{
|
||||||
protected $_em;
|
protected $_em;
|
||||||
protected $_emf;
|
protected $_emf;
|
||||||
|
|
||||||
protected function setUp() {
|
protected function setUp() {
|
||||||
if (isset($this->sharedFixture['em'])) {
|
if (isset($this->sharedFixture['em'])) {
|
||||||
$this->_em = $this->sharedFixture['em'];
|
$this->_em = $this->sharedFixture['em'];
|
||||||
} else {
|
} else {
|
||||||
$config = new Doctrine_Configuration();
|
$config = new Doctrine_Common_Configuration();
|
||||||
$eventManager = new Doctrine_EventManager();
|
$eventManager = new Doctrine_Common_EventManager();
|
||||||
$connectionOptions = array(
|
$connectionOptions = array(
|
||||||
'driverClass' => 'Doctrine_DriverMock',
|
'driverClass' => 'Doctrine_DriverMock',
|
||||||
'wrapperClass' => 'Doctrine_ConnectionMock',
|
'wrapperClass' => 'Doctrine_ConnectionMock',
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once 'lib/mocks/Doctrine_DriverConnectionMock.php';
|
require_once 'lib/mocks/Doctrine_DriverConnectionMock.php';
|
||||||
|
require_once 'lib/mocks/Doctrine_DatabasePlatformMock.php';
|
||||||
|
|
||||||
|
// THIS FILE DOES NOT EXIST YET!!!!
|
||||||
|
//require_once 'lib/mocks/Doctrine_SchemaManagerMock.php';
|
||||||
|
|
||||||
class Doctrine_DriverMock implements Doctrine_DBAL_Driver
|
class Doctrine_DriverMock implements Doctrine_DBAL_Driver
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user