ad4db34a87
Started refactoring in DQL parser to separate Production into Parser and AST classes. Finished first tests. Currently only 4 are active in IdentifierRecognitionTest, and only 2 are passing.
31 lines
859 B
PHP
31 lines
859 B
PHP
<?php
|
|
|
|
require_once 'lib/mocks/Doctrine_ConnectionMock.php';
|
|
|
|
/**
|
|
* Base testcase class for all orm testcases.
|
|
*
|
|
*/
|
|
class Doctrine_OrmTestCase extends Doctrine_TestCase
|
|
{
|
|
protected $_em;
|
|
protected $_emf;
|
|
|
|
protected function setUp() {
|
|
if (isset($this->sharedFixture['em'])) {
|
|
$this->_em = $this->sharedFixture['em'];
|
|
} else {
|
|
$config = new Doctrine_Configuration();
|
|
$eventManager = new Doctrine_EventManager();
|
|
$connectionOptions = array(
|
|
'driverClass' => 'Doctrine_ConnectionMock',
|
|
'user' => 'john',
|
|
'password' => 'wayne'
|
|
);
|
|
$em = Doctrine_EntityManager::create($connectionOptions, 'mockEM', $config, $eventManager);
|
|
$this->_em = $em;
|
|
}
|
|
$this->_em->activate();
|
|
}
|
|
}
|