2008-08-16 23:40:59 +04:00
|
|
|
<?php
|
|
|
|
|
2009-01-22 22:38:10 +03:00
|
|
|
namespace Doctrine\Tests\ORM;
|
|
|
|
|
2009-01-24 19:56:44 +03:00
|
|
|
require_once __DIR__ . '/../TestInit.php';
|
2008-08-16 23:40:59 +04:00
|
|
|
|
2009-01-22 22:38:10 +03:00
|
|
|
class EntityManagerTest extends \Doctrine\Tests\OrmTestCase
|
2009-01-04 19:15:32 +03:00
|
|
|
{
|
|
|
|
private $_em;
|
|
|
|
|
2009-02-18 10:59:11 +03:00
|
|
|
function setUp()
|
|
|
|
{
|
2009-01-04 19:15:32 +03:00
|
|
|
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.");
|
2009-02-07 20:02:13 +03:00
|
|
|
} catch (\Doctrine\ORM\EntityManagerException $expected) {}
|
2008-08-16 23:40:59 +04:00
|
|
|
$this->_em->setFlushMode($prev);
|
|
|
|
}
|
|
|
|
}
|