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