Skip to content

Commit 645e8bc

Browse files
committed
Do not iterate on CollectionInfoIterator multiple times
As of PHPC-255, we cannot rewind a Cursor. PHPLIB-81 will ultimately change this by caching results; however, there is also no need to assert the iterator count here, since we're asserting the name during iteration (two CollectionInfo results would not share the same name).
1 parent cdc9235 commit 645e8bc

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

tests/Database/CollectionManagementFunctionalTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ public function testListCollectionsWithFilter()
7070

7171
$collections = $this->database->listCollections($options);
7272
$this->assertInstanceOf('MongoDB\Model\CollectionInfoIterator', $collections);
73-
$this->assertCount(1, $collections);
7473

7574
foreach ($collections as $collection) {
7675
$this->assertInstanceOf('MongoDB\Model\CollectionInfo', $collection);

0 commit comments

Comments
 (0)