Commit 645e8bc0 authored by Jeremy Mikola's avatar Jeremy Mikola

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).
parent cdc92353
...@@ -70,7 +70,6 @@ class CollectionManagementFunctionalTest extends FunctionalTestCase ...@@ -70,7 +70,6 @@ class CollectionManagementFunctionalTest extends FunctionalTestCase
$collections = $this->database->listCollections($options); $collections = $this->database->listCollections($options);
$this->assertInstanceOf('MongoDB\Model\CollectionInfoIterator', $collections); $this->assertInstanceOf('MongoDB\Model\CollectionInfoIterator', $collections);
$this->assertCount(1, $collections);
foreach ($collections as $collection) { foreach ($collections as $collection) {
$this->assertInstanceOf('MongoDB\Model\CollectionInfo', $collection); $this->assertInstanceOf('MongoDB\Model\CollectionInfo', $collection);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment