1
0
mirror of synced 2024-12-14 07:06:04 +03:00
doctrine2/tests/lib/Doctrine_OrmTestCase.php
guilhermeblanco c8e4e7e7ab Small changes to get Query tests running again.
Fixed wrong DQL in IdentifierRecognitionTest.php
2008-09-13 06:34:47 +00:00

33 lines
979 B
PHP

<?php
require_once 'lib/mocks/Doctrine_DriverMock.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_Common_Configuration();
$eventManager = new Doctrine_Common_EventManager();
$connectionOptions = array(
'driverClass' => 'Doctrine_DriverMock',
'wrapperClass' => 'Doctrine_ConnectionMock',
'user' => 'john',
'password' => 'wayne'
);
$em = Doctrine_ORM_EntityManager::create($connectionOptions, 'mockEM', $config, $eventManager);
$this->_em = $em;
}
$this->_em->activate();
}
}