Skip to content

Commit

Permalink
Update comment regarding missing identifiers in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alcaeus committed Aug 22, 2023
1 parent e3d68a7 commit 0ed7f67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/Collection/CodecCollectionFunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,8 @@ public function testInsertOne($expected, $options): void
$result = $this->collection->insertOne(TestObject::createForFixture(1), $options);
$this->assertSame(1, $result->getInsertedCount());

// Add missing identifiers. This is relevant for the "No codec" data set, as the encoded document will not have
// an "_id" field and the driver will automatically generate one.
// Add missing identifiers. This is relevant for the "No codec" data set, as the encoded document will have an
// automatically generated identifier, which needs to be used in the expected document.
if ($expected instanceof BSONDocument && $expected->_id === null) {
$expected->_id = $result->getInsertedId();
}
Expand Down

0 comments on commit 0ed7f67

Please sign in to comment.