From c948b3e2e50bd4385e3969f57ecca5dd49d4b39e Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Wed, 21 Jun 2017 07:56:14 +0200 Subject: [PATCH] #6118 removing `flush\($entity\)` usage from the test suite --- tests/Doctrine/Tests/ORM/Functional/MergeProxiesTest.php | 2 +- .../Tests/ORM/Functional/ProxiesLikeEntitiesTest.php | 2 +- tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2790Test.php | 2 +- tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2984Test.php | 2 +- tests/Doctrine/Tests/ORM/Functional/ValueObjectsTest.php | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/Doctrine/Tests/ORM/Functional/MergeProxiesTest.php b/tests/Doctrine/Tests/ORM/Functional/MergeProxiesTest.php index b7c1757b039..c250592951d 100644 --- a/tests/Doctrine/Tests/ORM/Functional/MergeProxiesTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/MergeProxiesTest.php @@ -96,7 +96,7 @@ public function testMergeWithExistingUninitializedManagedProxy() $date = new DateTimeModel(); $this->em->persist($date); - $this->em->flush($date); + $this->em->flush(); $this->em->clear(); $managed = $this->em->getReference(DateTimeModel::class, $date->id); diff --git a/tests/Doctrine/Tests/ORM/Functional/ProxiesLikeEntitiesTest.php b/tests/Doctrine/Tests/ORM/Functional/ProxiesLikeEntitiesTest.php index 61107ca09e7..e5b3d2f3856 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ProxiesLikeEntitiesTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ProxiesLikeEntitiesTest.php @@ -89,7 +89,7 @@ public function testEntityWithIdentifier() self::assertInstanceOf(CmsUserProxy::class, $uninitializedProxy); $this->em->persist($uninitializedProxy); - $this->em->flush($uninitializedProxy); + $this->em->flush(); self::assertFalse($uninitializedProxy->__isInitialized(), 'Proxy didn\'t get initialized during flush operations'); self::assertEquals($userId, $uninitializedProxy->getId()); $this->em->remove($uninitializedProxy); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2790Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2790Test.php index 0e708aeaac7..31dd7aaba39 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2790Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2790Test.php @@ -45,7 +45,7 @@ public function testIssue() // (and consequently also triggers preUpdate/postUpdate for the entity in question) $entity->name = 'Robin'; - $this->em->flush($entity); + $this->em->flush(); $qb = $this->em->createQueryBuilder(); $qb->from(get_class($entity), 'c'); diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2984Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2984Test.php index 112f572c2ce..aabdb7a338b 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2984Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2984Test.php @@ -41,7 +41,7 @@ public function testIssue() $user->applyName('Alex'); $this->em->persist($user); - $this->em->flush($user); + $this->em->flush(); $repository = $this->em->getRepository(__NAMESPACE__ . "\DDC2984User"); diff --git a/tests/Doctrine/Tests/ORM/Functional/ValueObjectsTest.php b/tests/Doctrine/Tests/ORM/Functional/ValueObjectsTest.php index 6f39a70ec1f..a88df4a1c85 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ValueObjectsTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ValueObjectsTest.php @@ -144,7 +144,7 @@ public function testDqlOnEmbeddedObjectsField() $person = new DDC93Person('Johannes', new DDC93Address('Moo', '12345', 'Karlsruhe', new DDC93Country('Germany'))); $this->em->persist($person); - $this->em->flush($person); + $this->em->flush(); // SELECT $selectDql = "SELECT p FROM " . __NAMESPACE__ ."\\DDC93Person p WHERE p.address.city = :city AND p.address.country.name = :country"; @@ -187,7 +187,7 @@ public function testPartialDqlOnEmbeddedObjectsField() { $person = new DDC93Person('Karl', new DDC93Address('Foo', '12345', 'Gosport', new DDC93Country('England'))); $this->em->persist($person); - $this->em->flush($person); + $this->em->flush(); $this->em->clear(); // Prove that the entity was persisted correctly. @@ -257,7 +257,7 @@ public function testEmbeddableWithInheritance() { $car = new DDC93Car(new DDC93Address('Foo', '12345', 'Asdf')); $this->em->persist($car); - $this->em->flush($car); + $this->em->flush(); $reloadedCar = $this->em->find(DDC93Car::class, $car->id); self::assertEquals($car, $reloadedCar);