@@ -64,10 +64,10 @@ public function testInsertOneDocumentArgumentMissing()
64
64
65
65
/**
66
66
* @expectedException MongoDB\Exception\InvalidArgumentTypeException
67
- * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["insertOne"\]\[0\] to have type "[\w ]+ " but found "[\w ]+"/
68
- * @dataProvider provideInvalidDocumentArguments
67
+ * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["insertOne"\]\[0\] to have type "array or object " but found "[\w ]+"/
68
+ * @dataProvider provideInvalidDocumentValues
69
69
*/
70
- public function testInsertOneDocumentArgumentType ($ document )
70
+ public function testInsertOneDocumentArgumentTypeCheck ($ document )
71
71
{
72
72
new BulkWrite ($ this ->getDatabaseName (), $ this ->getCollectionName (), array (
73
73
array (BulkWrite::INSERT_ONE => array ($ document )),
@@ -87,10 +87,10 @@ public function testDeleteManyFilterArgumentMissing()
87
87
88
88
/**
89
89
* @expectedException MongoDB\Exception\InvalidArgumentTypeException
90
- * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["deleteMany"\]\[0\] to have type "[\w ]+ " but found "[\w ]+"/
91
- * @dataProvider provideInvalidDocumentArguments
90
+ * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["deleteMany"\]\[0\] to have type "array or object " but found "[\w ]+"/
91
+ * @dataProvider provideInvalidDocumentValues
92
92
*/
93
- public function testDeleteManyFilterArgumentType ($ document )
93
+ public function testDeleteManyFilterArgumentTypeCheck ($ document )
94
94
{
95
95
new BulkWrite ($ this ->getDatabaseName (), $ this ->getCollectionName (), array (
96
96
array (BulkWrite::DELETE_MANY => array ($ document )),
@@ -110,10 +110,10 @@ public function testDeleteOneFilterArgumentMissing()
110
110
111
111
/**
112
112
* @expectedException MongoDB\Exception\InvalidArgumentTypeException
113
- * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["deleteOne"\]\[0\] to have type "[\w ]+ " but found "[\w ]+"/
114
- * @dataProvider provideInvalidDocumentArguments
113
+ * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["deleteOne"\]\[0\] to have type "array or object " but found "[\w ]+"/
114
+ * @dataProvider provideInvalidDocumentValues
115
115
*/
116
- public function testDeleteOneFilterArgumentType ($ document )
116
+ public function testDeleteOneFilterArgumentTypeCheck ($ document )
117
117
{
118
118
new BulkWrite ($ this ->getDatabaseName (), $ this ->getCollectionName (), array (
119
119
array (BulkWrite::DELETE_ONE => array ($ document )),
@@ -133,10 +133,10 @@ public function testReplaceOneFilterArgumentMissing()
133
133
134
134
/**
135
135
* @expectedException MongoDB\Exception\InvalidArgumentTypeException
136
- * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["replaceOne"\]\[0\] to have type "[\w ]+ " but found "[\w ]+"/
137
- * @dataProvider provideInvalidDocumentArguments
136
+ * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["replaceOne"\]\[0\] to have type "array or object " but found "[\w ]+"/
137
+ * @dataProvider provideInvalidDocumentValues
138
138
*/
139
- public function testReplaceOneFilterArgumentType ($ filter )
139
+ public function testReplaceOneFilterArgumentTypeCheck ($ filter )
140
140
{
141
141
new BulkWrite ($ this ->getDatabaseName (), $ this ->getCollectionName (), array (
142
142
array (BulkWrite::REPLACE_ONE => array ($ filter , array ('y ' => 1 ))),
@@ -156,10 +156,10 @@ public function testReplaceOneReplacementArgumentMissing()
156
156
157
157
/**
158
158
* @expectedException MongoDB\Exception\InvalidArgumentTypeException
159
- * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["replaceOne"\]\[1\] to have type "[\w ]+ " but found "[\w ]+"/
160
- * @dataProvider provideInvalidDocumentArguments
159
+ * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["replaceOne"\]\[1\] to have type "array or object " but found "[\w ]+"/
160
+ * @dataProvider provideInvalidDocumentValues
161
161
*/
162
- public function testReplaceOneReplacementArgumentType ($ replacement )
162
+ public function testReplaceOneReplacementArgumentTypeCheck ($ replacement )
163
163
{
164
164
new BulkWrite ($ this ->getDatabaseName (), $ this ->getCollectionName (), array (
165
165
array (BulkWrite::REPLACE_ONE => array (array ('x ' => 1 ), $ replacement )),
@@ -179,10 +179,10 @@ public function testReplaceOneReplacementArgumentRequiresNoOperators()
179
179
180
180
/**
181
181
* @expectedException MongoDB\Exception\InvalidArgumentTypeException
182
- * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["replaceOne"\]\[2\]\["upsert"\] to have type "[\w ]+ " but found "[\w ]+"/
183
- * @dataProvider provideInvalidBooleanArguments
182
+ * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["replaceOne"\]\[2\]\["upsert"\] to have type "boolean " but found "[\w ]+"/
183
+ * @dataProvider provideInvalidBooleanValues
184
184
*/
185
- public function testReplaceOneUpsertOptionType ($ upsert )
185
+ public function testReplaceOneUpsertOptionTypeCheck ($ upsert )
186
186
{
187
187
new BulkWrite ($ this ->getDatabaseName (), $ this ->getCollectionName (), array (
188
188
array (BulkWrite::REPLACE_ONE => array (array ('x ' => 1 ), array ('y ' => 1 ), array ('upsert ' => $ upsert ))),
@@ -202,10 +202,10 @@ public function testUpdateManyFilterArgumentMissing()
202
202
203
203
/**
204
204
* @expectedException MongoDB\Exception\InvalidArgumentTypeException
205
- * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["updateMany"\]\[0\] to have type "[\w ]+ " but found "[\w ]+"/
206
- * @dataProvider provideInvalidDocumentArguments
205
+ * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["updateMany"\]\[0\] to have type "array or object " but found "[\w ]+"/
206
+ * @dataProvider provideInvalidDocumentValues
207
207
*/
208
- public function testUpdateManyFilterArgumentType ($ filter )
208
+ public function testUpdateManyFilterArgumentTypeCheck ($ filter )
209
209
{
210
210
new BulkWrite ($ this ->getDatabaseName (), $ this ->getCollectionName (), array (
211
211
array (BulkWrite::UPDATE_MANY => array ($ filter , array ('$set ' => array ('x ' => 1 )))),
@@ -225,10 +225,10 @@ public function testUpdateManyUpdateArgumentMissing()
225
225
226
226
/**
227
227
* @expectedException MongoDB\Exception\InvalidArgumentTypeException
228
- * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["updateMany"\]\[1\] to have type "[\w ]+ " but found "[\w ]+"/
229
- * @dataProvider provideInvalidDocumentArguments
228
+ * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["updateMany"\]\[1\] to have type "array or object " but found "[\w ]+"/
229
+ * @dataProvider provideInvalidDocumentValues
230
230
*/
231
- public function testUpdateManyUpdateArgumentType ($ update )
231
+ public function testUpdateManyUpdateArgumentTypeCheck ($ update )
232
232
{
233
233
new BulkWrite ($ this ->getDatabaseName (), $ this ->getCollectionName (), array (
234
234
array (BulkWrite::UPDATE_MANY => array (array ('x ' => 1 ), $ update )),
@@ -248,10 +248,10 @@ public function testUpdateManyUpdateArgumentRequiresOperators()
248
248
249
249
/**
250
250
* @expectedException MongoDB\Exception\InvalidArgumentTypeException
251
- * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["updateMany"\]\[2\]\["upsert"\] to have type "[\w ]+ " but found "[\w ]+"/
252
- * @dataProvider provideInvalidBooleanArguments
251
+ * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["updateMany"\]\[2\]\["upsert"\] to have type "boolean " but found "[\w ]+"/
252
+ * @dataProvider provideInvalidBooleanValues
253
253
*/
254
- public function testUpdateManyUpsertOptionType ($ upsert )
254
+ public function testUpdateManyUpsertOptionTypeCheck ($ upsert )
255
255
{
256
256
new BulkWrite ($ this ->getDatabaseName (), $ this ->getCollectionName (), array (
257
257
array (BulkWrite::UPDATE_MANY => array (array ('x ' => 1 ), array ('$set ' => array ('x ' => 1 )), array ('upsert ' => $ upsert ))),
@@ -271,10 +271,10 @@ public function testUpdateOneFilterArgumentMissing()
271
271
272
272
/**
273
273
* @expectedException MongoDB\Exception\InvalidArgumentTypeException
274
- * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["updateOne"\]\[0\] to have type "[\w ]+ " but found "[\w ]+"/
275
- * @dataProvider provideInvalidDocumentArguments
274
+ * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["updateOne"\]\[0\] to have type "array or object " but found "[\w ]+"/
275
+ * @dataProvider provideInvalidDocumentValues
276
276
*/
277
- public function testUpdateOneFilterArgumentType ($ filter )
277
+ public function testUpdateOneFilterArgumentTypeCheck ($ filter )
278
278
{
279
279
new BulkWrite ($ this ->getDatabaseName (), $ this ->getCollectionName (), array (
280
280
array (BulkWrite::UPDATE_ONE => array ($ filter , array ('$set ' => array ('x ' => 1 )))),
@@ -294,10 +294,10 @@ public function testUpdateOneUpdateArgumentMissing()
294
294
295
295
/**
296
296
* @expectedException MongoDB\Exception\InvalidArgumentTypeException
297
- * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["updateOne"\]\[1\] to have type "[\w ]+ " but found "[\w ]+"/
298
- * @dataProvider provideInvalidDocumentArguments
297
+ * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["updateOne"\]\[1\] to have type "array or object " but found "[\w ]+"/
298
+ * @dataProvider provideInvalidDocumentValues
299
299
*/
300
- public function testUpdateOneUpdateArgumentType ($ update )
300
+ public function testUpdateOneUpdateArgumentTypeCheck ($ update )
301
301
{
302
302
new BulkWrite ($ this ->getDatabaseName (), $ this ->getCollectionName (), array (
303
303
array (BulkWrite::UPDATE_ONE => array (array ('x ' => 1 ), $ update )),
@@ -317,10 +317,10 @@ public function testUpdateOneUpdateArgumentRequiresOperators()
317
317
318
318
/**
319
319
* @expectedException MongoDB\Exception\InvalidArgumentTypeException
320
- * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["updateOne"\]\[2\]\["upsert"\] to have type "[\w ]+ " but found "[\w ]+"/
321
- * @dataProvider provideInvalidBooleanArguments
320
+ * @expectedExceptionMessageRegExp /Expected \$operations\[0\]\["updateOne"\]\[2\]\["upsert"\] to have type "boolean " but found "[\w ]+"/
321
+ * @dataProvider provideInvalidBooleanValues
322
322
*/
323
- public function testUpdateOneUpsertOptionType ($ upsert )
323
+ public function testUpdateOneUpsertOptionTypeCheck ($ upsert )
324
324
{
325
325
new BulkWrite ($ this ->getDatabaseName (), $ this ->getCollectionName (), array (
326
326
array (BulkWrite::UPDATE_ONE => array (array ('x ' => 1 ), array ('$set ' => array ('x ' => 1 )), array ('upsert ' => $ upsert ))),
0 commit comments