Commit a5ad8410 authored by Jonathan Hawk's avatar Jonathan Hawk Committed by Jeremy Mikola

Add missing namespace imports in GridFS\Bucket (fixes #151)

parent ca9118ee
......@@ -5,6 +5,8 @@ namespace MongoDB\GridFS;
use MongoDB\BSON\ObjectId;
use MongoDB\Driver\Cursor;
use MongoDB\Driver\Manager;
use MongoDB\Driver\ReadPreference;
use MongoDB\Driver\WriteConcern;
use MongoDB\Exception\GridFSFileNotFoundException;
use MongoDB\Exception\InvalidArgumentException;
use MongoDB\Operation\Find;
......
......@@ -2,6 +2,8 @@
namespace MongoDB\Tests\GridFS;
use MongoDB\Driver\ReadPreference;
use MongoDB\Driver\WriteConcern;
use MongoDB\GridFS\Bucket;
/**
......@@ -9,6 +11,15 @@ use MongoDB\GridFS\Bucket;
*/
class BucketFunctionalTest extends FunctionalTestCase
{
public function testValidConstructorOptions()
{
new Bucket($this->manager, $this->getDatabaseName(), [
'bucketName' => 'test',
'chunkSizeBytes' => 8192,
'readPreference' => new ReadPreference(ReadPreference::RP_PRIMARY),
'writeConcern' => new WriteConcern(WriteConcern::MAJORITY, 1000),
]);
}
/**
* @expectedException MongoDB\Exception\InvalidArgumentException
......
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