File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
tests/Doctrine/ODM/MongoDB/Tests/Functional Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -162,9 +162,8 @@ public function testAtomicCollectionReplacedAndUpdated(): void
162
162
$ this ->assertCount (1 , $ this ->logger , 'Inserting a document with an embed-many collection requires one query ' );
163
163
$ this ->dm ->clear ();
164
164
165
- $ user = $ this ->dm ->getRepository (get_class ($ user ))->find ($ user ->id );
166
- $ user ->phonenumbers = new ArrayCollection ();
167
- $ user ->phonenumbers [] = new Phonenumber ('87654321 ' );
165
+ $ user = $ this ->dm ->getRepository (get_class ($ user ))->find ($ user ->id );
166
+ $ user ->phonenumbers = new ArrayCollection ([new Phonenumber ('87654321 ' )]);
168
167
$ this ->logger ->clear ();
169
168
$ this ->dm ->flush ();
170
169
$ this ->assertCount (1 , $ this ->logger , 'Updating emptied collection requires one query ' );
You can’t perform that action at this time.
0 commit comments