1
0
mirror of synced 2024-12-13 14:56:01 +03:00
doctrine2/tests/lib/Doctrine_OrmTestCase.php

28 lines
798 B
PHP
Raw Normal View History

2008-02-09 21:59:19 +03:00
<?php
/**
* Base testcase class for all orm testcases.
*
*/
class Doctrine_OrmTestCase extends Doctrine_TestCase
{
protected $_em;
protected $_emf;
2008-05-24 22:18:37 +04:00
protected function setUp() {
2008-09-07 17:48:40 +04:00
if (isset($this->sharedFixture['em'])) {
$this->_em = $this->sharedFixture['em'];
2008-09-07 17:48:40 +04:00
} else {
$config = new Doctrine_Configuration();
$eventManager = new Doctrine_EventManager();
$connectionOptions = array(
2008-09-07 17:48:40 +04:00
'driver' => 'Doctrine_ConnectionMock',
'user' => 'john',
'password' => 'wayne'
2008-09-07 17:48:40 +04:00
);
$em = Doctrine_EntityManager::create($connectionOptions, 'mockEM', $config, $eventManager);
$this->_em = $em;
}
2008-09-07 17:48:40 +04:00
$this->_em->activate();
2008-05-24 22:18:37 +04:00
}
}