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