1
0
mirror of synced 2024-12-13 22:56:04 +03:00
doctrine2/tests/Doctrine/Tests/ORM/EntityManagerTest.php

26 lines
653 B
PHP
Raw Normal View History

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