From 92dc39bfb9bf739d5a74ba7b5c79a4f31dd9d1c6 Mon Sep 17 00:00:00 2001 From: Darien Hager Date: Tue, 29 Sep 2015 18:35:57 -0700 Subject: [PATCH] Add extra assertions to test to ensure that flush actually succeeded in saving all items --- .../Tests/ORM/Functional/Ticket/DDC2922Test.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2922Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2922Test.php index ce7788740..188d68fee 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2922Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2922Test.php @@ -48,6 +48,11 @@ class DDC2922Test extends \Doctrine\Tests\OrmFunctionalTestCase $this->_em->flush(); + // Verify the flush succeeded + $this->assertEquals($email, $this->_em->find(get_class($email),$email->id)); + $this->assertEquals($address, $this->_em->find(get_class($address),$address->id)); + $this->assertEquals($user, $this->_em->find(get_class($user),$user->id)); + } /** @@ -101,5 +106,11 @@ class DDC2922Test extends \Doctrine\Tests\OrmFunctionalTestCase } throw $e; } + + // Verify the flushes succeeded + $this->assertEquals($email, $this->_em->find(get_class($email),$email->id)); + $this->assertEquals($address, $this->_em->find(get_class($address),$address->id)); + $this->assertEquals($user, $this->_em->find(get_class($user),$user->id)); + } } \ No newline at end of file