2008-06-05 23:01:58 +04:00
|
|
|
<?php
|
|
|
|
require_once 'lib/DoctrineTestInit.php';
|
|
|
|
|
|
|
|
#namespace Doctrine::Tests::ORM;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* EntityManagerFactory tests.
|
|
|
|
*/
|
|
|
|
class Orm_EntityManagerFactoryTest extends Doctrine_OrmTestCase
|
|
|
|
{
|
|
|
|
private $_mockOptions = array('driver' => 'mock', 'user' => '', 'password' => '');
|
|
|
|
|
|
|
|
protected function tearDown() {
|
|
|
|
parent::tearDown();
|
|
|
|
}
|
|
|
|
|
|
|
|
private function _createNamedManager($name)
|
|
|
|
{
|
|
|
|
return $this->_emf->createEntityManager($this->_mockOptions, $name);
|
|
|
|
}
|
|
|
|
|
2008-09-07 17:48:40 +04:00
|
|
|
/*public function testBindingEntityToNamedManager()
|
2008-06-05 23:01:58 +04:00
|
|
|
{
|
|
|
|
$myEM = $this->_createNamedManager('myEM');
|
|
|
|
$this->_emf->bindEntityToManager('SomeEntity', 'myEM');
|
|
|
|
$this->assertSame($myEM, $this->_emf->getEntityManager('SomeEntity'));
|
2008-09-07 17:48:40 +04:00
|
|
|
$this->_emf->releaseEntityManager($myEM);
|
2008-06-05 23:01:58 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testStaticLookup()
|
|
|
|
{
|
|
|
|
$this->assertTrue(Doctrine_EntityManagerFactory::getManager() instanceof Doctrine_EntityManager);
|
2008-09-07 17:48:40 +04:00
|
|
|
}*/
|
2008-06-05 23:01:58 +04:00
|
|
|
|
|
|
|
}
|