28 lines
702 B
PHP
28 lines
702 B
PHP
<?php
|
|
|
|
namespace Doctrine\Tests\ORM;
|
|
|
|
require_once dirname(__FILE__) . '/../TestInit.php';
|
|
|
|
/**
|
|
* EntityManager tests.
|
|
*/
|
|
class EntityManagerTest extends \Doctrine\Tests\OrmTestCase
|
|
{
|
|
private $_em;
|
|
|
|
function setUp() {
|
|
parent::setUp();
|
|
$this->_em = $this->_getTestEntityManager();
|
|
}
|
|
|
|
public function testSettingInvalidFlushModeThrowsException()
|
|
{
|
|
$prev = $this->_em->getFlushMode();
|
|
try {
|
|
$this->_em->setFlushMode('foobar');
|
|
$this->fail("Setting invalid flushmode did not trigger exception.");
|
|
} catch (\Doctrine\ORM\Exceptions\EntityManagerException $expected) {}
|
|
$this->_em->setFlushMode($prev);
|
|
}
|
|
} |