2008-08-16 23:40:59 +04:00
|
|
|
<?php
|
|
|
|
require_once 'lib/DoctrineTestInit.php';
|
|
|
|
|
2009-01-04 19:15:32 +03:00
|
|
|
#namespace Doctrine\Tests\ORM;
|
2008-08-16 23:40:59 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* EntityManager tests.
|
|
|
|
*/
|
|
|
|
class Orm_EntityManagerTest extends Doctrine_OrmTestCase
|
2009-01-04 19:15:32 +03:00
|
|
|
{
|
|
|
|
private $_em;
|
|
|
|
|
|
|
|
function setUp() {
|
|
|
|
parent::setUp();
|
|
|
|
$this->_em = $this->_getTestEntityManager();
|
|
|
|
}
|
|
|
|
|
2008-08-16 23:40:59 +04:00
|
|
|
public function testSettingInvalidFlushModeThrowsException()
|
|
|
|
{
|
|
|
|
$prev = $this->_em->getFlushMode();
|
|
|
|
try {
|
|
|
|
$this->_em->setFlushMode('foobar');
|
|
|
|
$this->fail("Setting invalid flushmode did not trigger exception.");
|
2008-09-12 13:37:05 +04:00
|
|
|
} catch (Doctrine_ORM_Exceptions_EntityManagerException $expected) {}
|
2008-08-16 23:40:59 +04:00
|
|
|
$this->_em->setFlushMode($prev);
|
|
|
|
}
|
|
|
|
}
|