1
0
mirror of synced 2025-01-08 10:07:10 +03:00
doctrine2/tests/lib/Doctrine_OrmTestCase.php

30 lines
916 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() {
if (isset($this->sharedFixture['emf'], $this->sharedFixture['em'])) {
$this->_emf = $this->sharedFixture['emf'];
$this->_em = $this->sharedFixture['em'];
} else {
$emf = new Doctrine_EntityManagerFactory();
$emf->setConfiguration(new Doctrine_Configuration());
$emf->setEventManager(new Doctrine_EventManager());
$connectionOptions = array(
'driver' => 'mock',
'user' => 'john',
'password' => 'wayne'
);
$em = $emf->createEntityManager($connectionOptions, 'mockEM');
$this->_emf = $emf;
$this->_em = $em;
}
2008-05-24 22:18:37 +04:00
}
}