Adding minimal test to verify EntityManager
behavior against #5796
This commit is contained in:
parent
12043cd845
commit
c016e2d434
@ -232,6 +232,24 @@ class EntityManagerTest extends OrmTestCase
|
|||||||
EntityManager::create(1, $config);
|
EntityManager::create(1, $config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group #5796
|
||||||
|
*/
|
||||||
|
public function testTransactionalReThrowsThrowables()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$this->_em->transactional(function () {
|
||||||
|
(function (array $value) {
|
||||||
|
// this only serves as an IIFE that throws a `TypeError`
|
||||||
|
})(null);
|
||||||
|
});
|
||||||
|
|
||||||
|
self::fail('TypeError expected to be thrown');
|
||||||
|
} catch (\TypeError $ignored) {
|
||||||
|
self::assertFalse($this->_em->isOpen());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @group 6017
|
* @group 6017
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user