1
0
mirror of synced 2024-12-13 22:56:04 +03:00
doctrine2/tests/Doctrine/Tests/ORM/EntityManagerTest.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);
}
}