File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 5
5
use MongoDB \BSON \ObjectId ;
6
6
use MongoDB \Driver \Cursor ;
7
7
use MongoDB \Driver \Manager ;
8
+ use MongoDB \Driver \ReadPreference ;
9
+ use MongoDB \Driver \WriteConcern ;
8
10
use MongoDB \Exception \GridFSFileNotFoundException ;
9
11
use MongoDB \Exception \InvalidArgumentException ;
10
12
use MongoDB \Operation \Find ;
Original file line number Diff line number Diff line change 2
2
3
3
namespace MongoDB \Tests \GridFS ;
4
4
5
+ use MongoDB \Driver \ReadPreference ;
6
+ use MongoDB \Driver \WriteConcern ;
5
7
use MongoDB \GridFS \Bucket ;
6
8
7
9
/**
8
10
* Functional tests for the Bucket class.
9
11
*/
10
12
class BucketFunctionalTest extends FunctionalTestCase
11
13
{
14
+ public function testValidConstructorOptions ()
15
+ {
16
+ new Bucket ($ this ->manager , $ this ->getDatabaseName (), [
17
+ 'bucketName ' => 'test ' ,
18
+ 'chunkSizeBytes ' => 8192 ,
19
+ 'readPreference ' => new ReadPreference (ReadPreference::RP_PRIMARY ),
20
+ 'writeConcern ' => new WriteConcern (WriteConcern::MAJORITY , 1000 ),
21
+ ]);
22
+ }
12
23
13
24
/**
14
25
* @expectedException MongoDB\Exception\InvalidArgumentException
You can’t perform that action at this time.
0 commit comments