Skip to content

Commit 909121f

Browse files
committed
Explain why rewind() is not used in testNextAdvancesKey()
1 parent adbea29 commit 909121f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/Operation/WatchFunctionalTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,8 @@ public function testNextAdvancesKey()
746746
$this->insertDocument(['x' => 1]);
747747
$this->insertDocument(['x' => 2]);
748748

749+
/* Note: we intentionally do not start iteration with rewind() to ensure
750+
* that next() behaves identically when called without rewind(). */
749751
$changeStream->next();
750752

751753
$this->assertSame(0, $changeStream->key());

0 commit comments

Comments
 (0)