public function testGetIteratorShouldThrowExceptionAfterExecutingForTypesThatShouldReturnAnIteratorButDoNot($type, $method)
{
$collection = $this->getMockCollection();
$collection->expects($this->once())->method($method)->will($this->returnValue(null));
// Create a query array with any fields that may be expected to exist
$queryArray = ['type' => $type, 'query' => [], 'group' => ['keys' => [], 'initial' => [], 'reduce' => '', 'options' => []], 'mapReduce' => ['map' => '', 'reduce' => '', 'out' => '', 'options' => []], 'geoNear' => ['near' => [], 'options' => []], 'distinct' => 0];
$query = new Query($collection, $queryArray, []);
$query->getIterator();
}