Skip to content

Commit

Permalink
doctrine#6118 removing flush\($entity\) usage from the test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius authored and lcobucci committed Dec 31, 2017
1 parent e204b96 commit c948b3e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/ORM/Functional/MergeProxiesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2790Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2984Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
6 changes: 3 additions & 3 deletions tests/Doctrine/Tests/ORM/Functional/ValueObjectsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c948b3e

Please sign in to comment.