26
26
/**
27
27
* Prose test 22: Range Explicit Encryption
28
28
*
29
- * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst# range-explicit-encryption
29
+ * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md#22- range-explicit-encryption
30
30
* @group csfle
31
31
* @group serverless
32
32
*/
@@ -49,8 +49,7 @@ public function setUp(): void
49
49
$ this ->markTestSkipped ('Range explicit encryption tests require replica sets ' );
50
50
}
51
51
52
- $ this ->skipIfServerVersion ('< ' , '7.0.0 ' , 'Range explicit encryption tests require MongoDB 7.0 or later ' );
53
- $ this ->skipIfServerVersion ('>= ' , '8.0.0 ' , 'Range explicit encryption tests require MongoDB 8.0 or earlier ' );
52
+ $ this ->skipIfServerVersion ('< ' , '8.0.0 ' , 'Range explicit encryption tests require MongoDB 8.0 or later ' );
54
53
55
54
$ client = static ::createTestClient ();
56
55
@@ -98,7 +97,7 @@ public function setUpWithTypeAndRangeOpts(string $type, array $rangeOpts): void
98
97
99
98
$ encryptOpts = [
100
99
'keyId ' => $ this ->key1Id ,
101
- 'algorithm ' => ClientEncryption::ALGORITHM_RANGE_PREVIEW ,
100
+ 'algorithm ' => ClientEncryption::ALGORITHM_RANGE ,
102
101
'contentionFactor ' => 0 ,
103
102
'rangeOpts ' => $ rangeOpts ,
104
103
];
@@ -123,7 +122,7 @@ public function tearDown(): void
123
122
$ this ->encryptedClient = null ;
124
123
}
125
124
126
- /** @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst #test-setup-rangeopts */
125
+ /** @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md #test-setup-rangeopts */
127
126
public static function provideTypeAndRangeOpts (): Generator
128
127
{
129
128
// TODO: skip DecimalNoPrecision test on mongos
@@ -186,7 +185,7 @@ public static function provideTypeAndRangeOpts(): Generator
186
185
}
187
186
188
187
/**
189
- * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst #case-1-can-decrypt-a-payload
188
+ * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md #case-1-can-decrypt-a-payload
190
189
* @dataProvider provideTypeAndRangeOpts
191
190
*/
192
191
public function testCase1_CanDecryptAPayload (string $ type , array $ rangeOpts ): void
@@ -195,7 +194,7 @@ public function testCase1_CanDecryptAPayload(string $type, array $rangeOpts): vo
195
194
196
195
$ encryptOpts = [
197
196
'keyId ' => $ this ->key1Id ,
198
- 'algorithm ' => ClientEncryption::ALGORITHM_RANGE_PREVIEW ,
197
+ 'algorithm ' => ClientEncryption::ALGORITHM_RANGE ,
199
198
'contentionFactor ' => 0 ,
200
199
'rangeOpts ' => $ rangeOpts ,
201
200
];
@@ -220,7 +219,7 @@ public function testCase1_CanDecryptAPayload(string $type, array $rangeOpts): vo
220
219
}
221
220
222
221
/**
223
- * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst #case-2-can-find-encrypted-range-and-return-the-maximum
222
+ * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md #case-2-can-find-encrypted-range-and-return-the-maximum
224
223
* @dataProvider provideTypeAndRangeOpts
225
224
*/
226
225
public function testCase2_CanFindEncryptedRangeAndReturnTheMaximum (string $ type , array $ rangeOpts ): void
@@ -229,8 +228,8 @@ public function testCase2_CanFindEncryptedRangeAndReturnTheMaximum(string $type,
229
228
230
229
$ encryptOpts = [
231
230
'keyId ' => $ this ->key1Id ,
232
- 'algorithm ' => ClientEncryption::ALGORITHM_RANGE_PREVIEW ,
233
- 'queryType ' => ClientEncryption::QUERY_TYPE_RANGE_PREVIEW ,
231
+ 'algorithm ' => ClientEncryption::ALGORITHM_RANGE ,
232
+ 'queryType ' => ClientEncryption::QUERY_TYPE_RANGE ,
234
233
'contentionFactor ' => 0 ,
235
234
'rangeOpts ' => $ rangeOpts ,
236
235
];
@@ -258,7 +257,7 @@ public function testCase2_CanFindEncryptedRangeAndReturnTheMaximum(string $type,
258
257
}
259
258
260
259
/**
261
- * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst #case-3-can-find-encrypted-range-and-return-the-minimum
260
+ * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md #case-3-can-find-encrypted-range-and-return-the-minimum
262
261
* @dataProvider provideTypeAndRangeOpts
263
262
*/
264
263
public function testCase3_CanFindEncryptedRangeAndReturnTheMinimum (string $ type , array $ rangeOpts ): void
@@ -267,8 +266,8 @@ public function testCase3_CanFindEncryptedRangeAndReturnTheMinimum(string $type,
267
266
268
267
$ encryptOpts = [
269
268
'keyId ' => $ this ->key1Id ,
270
- 'algorithm ' => ClientEncryption::ALGORITHM_RANGE_PREVIEW ,
271
- 'queryType ' => ClientEncryption::QUERY_TYPE_RANGE_PREVIEW ,
269
+ 'algorithm ' => ClientEncryption::ALGORITHM_RANGE ,
270
+ 'queryType ' => ClientEncryption::QUERY_TYPE_RANGE ,
272
271
'contentionFactor ' => 0 ,
273
272
'rangeOpts ' => $ rangeOpts ,
274
273
];
@@ -295,7 +294,7 @@ public function testCase3_CanFindEncryptedRangeAndReturnTheMinimum(string $type,
295
294
}
296
295
297
296
/**
298
- * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst #case-4-can-find-encrypted-range-with-an-open-range-query
297
+ * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md #case-4-can-find-encrypted-range-with-an-open-range-query
299
298
* @dataProvider provideTypeAndRangeOpts
300
299
*/
301
300
public function testCase4_CanFindEncryptedRangeWithAnOpenRangeQuery (string $ type , array $ rangeOpts ): void
@@ -304,8 +303,8 @@ public function testCase4_CanFindEncryptedRangeWithAnOpenRangeQuery(string $type
304
303
305
304
$ encryptOpts = [
306
305
'keyId ' => $ this ->key1Id ,
307
- 'algorithm ' => ClientEncryption::ALGORITHM_RANGE_PREVIEW ,
308
- 'queryType ' => ClientEncryption::QUERY_TYPE_RANGE_PREVIEW ,
306
+ 'algorithm ' => ClientEncryption::ALGORITHM_RANGE ,
307
+ 'queryType ' => ClientEncryption::QUERY_TYPE_RANGE ,
309
308
'contentionFactor ' => 0 ,
310
309
'rangeOpts ' => $ rangeOpts ,
311
310
];
@@ -323,7 +322,7 @@ public function testCase4_CanFindEncryptedRangeWithAnOpenRangeQuery(string $type
323
322
}
324
323
325
324
/**
326
- * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst #case-5-can-run-an-aggregation-expression-inside-expr
325
+ * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md #case-5-can-run-an-aggregation-expression-inside-expr
327
326
* @dataProvider provideTypeAndRangeOpts
328
327
*/
329
328
public function testCase5_CanRunAnAggregationExpressionInsideExpr (string $ type , array $ rangeOpts ): void
@@ -332,8 +331,8 @@ public function testCase5_CanRunAnAggregationExpressionInsideExpr(string $type,
332
331
333
332
$ encryptOpts = [
334
333
'keyId ' => $ this ->key1Id ,
335
- 'algorithm ' => ClientEncryption::ALGORITHM_RANGE_PREVIEW ,
336
- 'queryType ' => ClientEncryption::QUERY_TYPE_RANGE_PREVIEW ,
334
+ 'algorithm ' => ClientEncryption::ALGORITHM_RANGE ,
335
+ 'queryType ' => ClientEncryption::QUERY_TYPE_RANGE ,
337
336
'contentionFactor ' => 0 ,
338
337
'rangeOpts ' => $ rangeOpts ,
339
338
];
@@ -356,7 +355,7 @@ public function testCase5_CanRunAnAggregationExpressionInsideExpr(string $type,
356
355
}
357
356
358
357
/**
359
- * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst #case-6-encrypting-a-document-greater-than-the-maximum-errors
358
+ * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md #case-6-encrypting-a-document-greater-than-the-maximum-errors
360
359
* @dataProvider provideTypeAndRangeOpts
361
360
*/
362
361
public function testCase6_EncryptingADocumentGreaterThanTheMaximumErrors (string $ type , array $ rangeOpts ): void
@@ -369,7 +368,7 @@ public function testCase6_EncryptingADocumentGreaterThanTheMaximumErrors(string
369
368
370
369
$ encryptOpts = [
371
370
'keyId ' => $ this ->key1Id ,
372
- 'algorithm ' => ClientEncryption::ALGORITHM_RANGE_PREVIEW ,
371
+ 'algorithm ' => ClientEncryption::ALGORITHM_RANGE ,
373
372
'contentionFactor ' => 0 ,
374
373
'rangeOpts ' => $ rangeOpts ,
375
374
];
@@ -382,7 +381,7 @@ public function testCase6_EncryptingADocumentGreaterThanTheMaximumErrors(string
382
381
}
383
382
384
383
/**
385
- * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst #case-7-encrypting-a-value-of-a-different-type-errors
384
+ * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md #case-7-encrypting-a-value-of-a-different-type-errors
386
385
* @dataProvider provideTypeAndRangeOpts
387
386
*/
388
387
public function testCase7_EncryptingAValueOfADifferentTypeErrors (string $ type , array $ rangeOpts ): void
@@ -397,7 +396,7 @@ public function testCase7_EncryptingAValueOfADifferentTypeErrors(string $type, a
397
396
398
397
$ encryptOpts = [
399
398
'keyId ' => $ this ->key1Id ,
400
- 'algorithm ' => ClientEncryption::ALGORITHM_RANGE_PREVIEW ,
399
+ 'algorithm ' => ClientEncryption::ALGORITHM_RANGE ,
401
400
'contentionFactor ' => 0 ,
402
401
'rangeOpts ' => $ rangeOpts ,
403
402
];
@@ -410,7 +409,7 @@ public function testCase7_EncryptingAValueOfADifferentTypeErrors(string $type, a
410
409
}
411
410
412
411
/**
413
- * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst #case-8-setting-precision-errors-if-the-type-is-not-double-or-decimal128
412
+ * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md #case-8-setting-precision-errors-if-the-type-is-not-double-or-decimal128
414
413
* @dataProvider provideTypeAndRangeOpts
415
414
*/
416
415
public function testCase8_SettingPrecisionErrorsIfTheTypeIsNotDoubleOrDecimal128 (string $ type , array $ rangeOpts ): void
@@ -423,7 +422,7 @@ public function testCase8_SettingPrecisionErrorsIfTheTypeIsNotDoubleOrDecimal128
423
422
424
423
$ encryptOpts = [
425
424
'keyId ' => $ this ->key1Id ,
426
- 'algorithm ' => ClientEncryption::ALGORITHM_RANGE_PREVIEW ,
425
+ 'algorithm ' => ClientEncryption::ALGORITHM_RANGE ,
427
426
'contentionFactor ' => 0 ,
428
427
'rangeOpts ' => $ rangeOpts + ['precision ' => 2 ],
429
428
];
0 commit comments