1
0
mirror of synced 2024-12-13 14:56:01 +03:00
doctrine2/tests/lib/Doctrine_OrmTestCase.php
guilhermeblanco ad4db34a87 Fixes in unit tests.
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.
2008-09-12 06:09:16 +00:00

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