File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 17
17
18
18
namespace MongoDB \Operation ;
19
19
20
+ use MongoDB \Driver \BulkWrite as Bulk ;
20
21
use MongoDB \Driver \Command ;
21
22
use MongoDB \Driver \Server ;
22
23
use MongoDB \Driver \WriteConcern ;
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace MongoDB \Tests \Operation ;
4
+
5
+ use MongoDB \Operation \ListCollections ;
6
+
7
+ class ListCollectionsTest extends TestCase
8
+ {
9
+ /**
10
+ * @expectedException MongoDB\Exception\InvalidArgumentException
11
+ * @dataProvider provideInvalidConstructorOptions
12
+ */
13
+ public function testConstructorOptionTypeChecks (array $ options )
14
+ {
15
+ new ListCollections ($ this ->getDatabaseName (), $ options );
16
+ }
17
+
18
+ public function provideInvalidConstructorOptions ()
19
+ {
20
+ $ options = [];
21
+
22
+ foreach ($ this ->getInvalidDocumentValues () as $ value ) {
23
+ $ options [][] = ['filter ' => $ value ];
24
+ }
25
+
26
+ foreach ($ this ->getInvalidIntegerValues () as $ value ) {
27
+ $ options [][] = ['maxTimeMS ' => $ value ];
28
+ }
29
+
30
+ return $ options ;
31
+ }
32
+ }
You can’t perform that action at this time.
0 commit comments