1
0
mirror of synced 2025-02-02 21:41:45 +03:00

Adding minimal test to verify EntityManager behavior against #5796

This commit is contained in:
Marco Pivetta 2017-09-02 13:55:07 +02:00
parent 12043cd845
commit c016e2d434
No known key found for this signature in database
GPG Key ID: 4167D3337FD9D629

View File

@ -232,6 +232,24 @@ class EntityManagerTest extends OrmTestCase
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
*/