Commit 8b808043 authored by Jeremy Mikola's avatar Jeremy Mikola

Create test for ListCollections constructor options

parent 971545cc
......@@ -17,6 +17,7 @@
namespace MongoDB\Operation;
use MongoDB\Driver\BulkWrite as Bulk;
use MongoDB\Driver\Command;
use MongoDB\Driver\Server;
use MongoDB\Driver\WriteConcern;
......
<?php
namespace MongoDB\Tests\Operation;
use MongoDB\Operation\ListCollections;
class ListCollectionsTest extends TestCase
{
/**
* @expectedException MongoDB\Exception\InvalidArgumentException
* @dataProvider provideInvalidConstructorOptions
*/
public function testConstructorOptionTypeChecks(array $options)
{
new ListCollections($this->getDatabaseName(), $options);
}
public function provideInvalidConstructorOptions()
{
$options = [];
foreach ($this->getInvalidDocumentValues() as $value) {
$options[][] = ['filter' => $value];
}
foreach ($this->getInvalidIntegerValues() as $value) {
$options[][] = ['maxTimeMS' => $value];
}
return $options;
}
}
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