Skip to content

Commit

Permalink
Merge pull request #2417 from franmomu/fix_phpstan
Browse files Browse the repository at this point in the history
Fix PHPStan build
  • Loading branch information
malarzm authored Mar 8, 2022
2 parents d15c857 + f64145a commit 4cc90c3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/Doctrine/ODM/MongoDB/Tests/Functional/AtomicSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,8 @@ public function testAtomicCollectionReplacedAndUpdated(): void
$this->assertCount(1, $this->logger, 'Inserting a document with an embed-many collection requires one query');
$this->dm->clear();

$user = $this->dm->getRepository(get_class($user))->find($user->id);
$user->phonenumbers = new ArrayCollection();
$user->phonenumbers[] = new Phonenumber('87654321');
$user = $this->dm->getRepository(get_class($user))->find($user->id);
$user->phonenumbers = new ArrayCollection([new Phonenumber('87654321')]);
$this->logger->clear();
$this->dm->flush();
$this->assertCount(1, $this->logger, 'Updating emptied collection requires one query');
Expand Down

0 comments on commit 4cc90c3

Please sign in to comment.