From a754eae0f0637988688e70fab2c51b8c9029f045 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Tue, 22 Aug 2017 08:51:27 +0200 Subject: [PATCH] #1521 DDC-2922 verifying that persistence operations will resume normally after a crash due to invalid new values detected on associations - tweaked test to make it fail --- tests/Doctrine/Tests/ORM/UnitOfWorkTest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/Doctrine/Tests/ORM/UnitOfWorkTest.php b/tests/Doctrine/Tests/ORM/UnitOfWorkTest.php index 2a06c28f3..ab6bd9c2c 100644 --- a/tests/Doctrine/Tests/ORM/UnitOfWorkTest.php +++ b/tests/Doctrine/Tests/ORM/UnitOfWorkTest.php @@ -746,13 +746,12 @@ class UnitOfWorkTest extends OrmTestCase self::assertEmpty($persister2->getInserts()); } - $this->_unitOfWork->persist($cascadePersisted); - $this->_unitOfWork->persist($nonCascading); + $this->_unitOfWork->persist(new CascadePersistedEntity()); $this->_unitOfWork->commit(); // Persistence operations should just recover normally: self::assertCount(1, $persister1->getInserts()); - self::assertCount(1, $persister2->getInserts()); + self::assertCount(0, $persister2->getInserts()); } }