24
24
/**
25
25
* Prose test 22: Range Explicit Encryption
26
26
*
27
- * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst# range-explicit-encryption
27
+ * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md#22- range-explicit-encryption
28
28
* @group csfle
29
29
* @group serverless
30
30
*/
@@ -43,8 +43,7 @@ public function setUp(): void
43
43
$ this ->markTestSkipped ('Range explicit encryption tests require replica sets ' );
44
44
}
45
45
46
- $ this ->skipIfServerVersion ('< ' , '7.0.0 ' , 'Range explicit encryption tests require MongoDB 7.0 or later ' );
47
- $ this ->skipIfServerVersion ('>= ' , '8.0.0 ' , 'Range explicit encryption tests require MongoDB 8.0 or earlier ' );
46
+ $ this ->skipIfServerVersion ('< ' , '8.0.0 ' , 'Range explicit encryption tests require MongoDB 8.0 or later ' );
48
47
49
48
$ client = static ::createTestClient ();
50
49
@@ -92,7 +91,7 @@ public function setUpWithTypeAndRangeOpts(string $type, array $rangeOpts): void
92
91
93
92
$ encryptOpts = [
94
93
'keyId ' => $ this ->key1Id ,
95
- 'algorithm ' => ClientEncryption::ALGORITHM_RANGE_PREVIEW ,
94
+ 'algorithm ' => ClientEncryption::ALGORITHM_RANGE ,
96
95
'contentionFactor ' => 0 ,
97
96
'rangeOpts ' => $ rangeOpts ,
98
97
];
@@ -117,7 +116,7 @@ public function tearDown(): void
117
116
$ this ->encryptedClient = null ;
118
117
}
119
118
120
- /** @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst #test-setup-rangeopts */
119
+ /** @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md #test-setup-rangeopts */
121
120
public static function provideTypeAndRangeOpts (): Generator
122
121
{
123
122
// TODO: skip DecimalNoPrecision test on mongos
@@ -180,7 +179,7 @@ public static function provideTypeAndRangeOpts(): Generator
180
179
}
181
180
182
181
/**
183
- * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst #case-1-can-decrypt-a-payload
182
+ * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md #case-1-can-decrypt-a-payload
184
183
* @dataProvider provideTypeAndRangeOpts
185
184
*/
186
185
public function testCase1_CanDecryptAPayload (string $ type , array $ rangeOpts ): void
@@ -189,7 +188,7 @@ public function testCase1_CanDecryptAPayload(string $type, array $rangeOpts): vo
189
188
190
189
$ encryptOpts = [
191
190
'keyId ' => $ this ->key1Id ,
192
- 'algorithm ' => ClientEncryption::ALGORITHM_RANGE_PREVIEW ,
191
+ 'algorithm ' => ClientEncryption::ALGORITHM_RANGE ,
193
192
'contentionFactor ' => 0 ,
194
193
'rangeOpts ' => $ rangeOpts ,
195
194
];
@@ -214,7 +213,7 @@ public function testCase1_CanDecryptAPayload(string $type, array $rangeOpts): vo
214
213
}
215
214
216
215
/**
217
- * @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
216
+ * @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
218
217
* @dataProvider provideTypeAndRangeOpts
219
218
*/
220
219
public function testCase2_CanFindEncryptedRangeAndReturnTheMaximum (string $ type , array $ rangeOpts ): void
@@ -223,8 +222,8 @@ public function testCase2_CanFindEncryptedRangeAndReturnTheMaximum(string $type,
223
222
224
223
$ encryptOpts = [
225
224
'keyId ' => $ this ->key1Id ,
226
- 'algorithm ' => ClientEncryption::ALGORITHM_RANGE_PREVIEW ,
227
- 'queryType ' => ClientEncryption::QUERY_TYPE_RANGE_PREVIEW ,
225
+ 'algorithm ' => ClientEncryption::ALGORITHM_RANGE ,
226
+ 'queryType ' => ClientEncryption::QUERY_TYPE_RANGE ,
228
227
'contentionFactor ' => 0 ,
229
228
'rangeOpts ' => $ rangeOpts ,
230
229
];
@@ -252,7 +251,7 @@ public function testCase2_CanFindEncryptedRangeAndReturnTheMaximum(string $type,
252
251
}
253
252
254
253
/**
255
- * @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
254
+ * @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
256
255
* @dataProvider provideTypeAndRangeOpts
257
256
*/
258
257
public function testCase3_CanFindEncryptedRangeAndReturnTheMinimum (string $ type , array $ rangeOpts ): void
@@ -261,8 +260,8 @@ public function testCase3_CanFindEncryptedRangeAndReturnTheMinimum(string $type,
261
260
262
261
$ encryptOpts = [
263
262
'keyId ' => $ this ->key1Id ,
264
- 'algorithm ' => ClientEncryption::ALGORITHM_RANGE_PREVIEW ,
265
- 'queryType ' => ClientEncryption::QUERY_TYPE_RANGE_PREVIEW ,
263
+ 'algorithm ' => ClientEncryption::ALGORITHM_RANGE ,
264
+ 'queryType ' => ClientEncryption::QUERY_TYPE_RANGE ,
266
265
'contentionFactor ' => 0 ,
267
266
'rangeOpts ' => $ rangeOpts ,
268
267
];
@@ -289,7 +288,7 @@ public function testCase3_CanFindEncryptedRangeAndReturnTheMinimum(string $type,
289
288
}
290
289
291
290
/**
292
- * @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
291
+ * @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
293
292
* @dataProvider provideTypeAndRangeOpts
294
293
*/
295
294
public function testCase4_CanFindEncryptedRangeWithAnOpenRangeQuery (string $ type , array $ rangeOpts ): void
@@ -298,8 +297,8 @@ public function testCase4_CanFindEncryptedRangeWithAnOpenRangeQuery(string $type
298
297
299
298
$ encryptOpts = [
300
299
'keyId ' => $ this ->key1Id ,
301
- 'algorithm ' => ClientEncryption::ALGORITHM_RANGE_PREVIEW ,
302
- 'queryType ' => ClientEncryption::QUERY_TYPE_RANGE_PREVIEW ,
300
+ 'algorithm ' => ClientEncryption::ALGORITHM_RANGE ,
301
+ 'queryType ' => ClientEncryption::QUERY_TYPE_RANGE ,
303
302
'contentionFactor ' => 0 ,
304
303
'rangeOpts ' => $ rangeOpts ,
305
304
];
@@ -317,7 +316,7 @@ public function testCase4_CanFindEncryptedRangeWithAnOpenRangeQuery(string $type
317
316
}
318
317
319
318
/**
320
- * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.rst #case-5-can-run-an-aggregation-expression-inside-expr
319
+ * @see https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/tests/README.md #case-5-can-run-an-aggregation-expression-inside-expr
321
320
* @dataProvider provideTypeAndRangeOpts
322
321
*/
323
322
public function testCase5_CanRunAnAggregationExpressionInsideExpr (string $ type , array $ rangeOpts ): void
@@ -326,8 +325,8 @@ public function testCase5_CanRunAnAggregationExpressionInsideExpr(string $type,
326
325
327
326
$ encryptOpts = [
328
327
'keyId ' => $ this ->key1Id ,
329
- 'algorithm ' => ClientEncryption::ALGORITHM_RANGE_PREVIEW ,
330
- 'queryType ' => ClientEncryption::QUERY_TYPE_RANGE_PREVIEW ,
328
+ 'algorithm ' => ClientEncryption::ALGORITHM_RANGE ,
329
+ 'queryType ' => ClientEncryption::QUERY_TYPE_RANGE ,
331
330
'contentionFactor ' => 0 ,
332
331
'rangeOpts ' => $ rangeOpts ,
333
332
];
@@ -350,7 +349,7 @@ public function testCase5_CanRunAnAggregationExpressionInsideExpr(string $type,
350
349
}
351
350
352
351
/**
353
- * @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
352
+ * @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
354
353
* @dataProvider provideTypeAndRangeOpts
355
354
*/
356
355
public function testCase6_EncryptingADocumentGreaterThanTheMaximumErrors (string $ type , array $ rangeOpts ): void
@@ -363,7 +362,7 @@ public function testCase6_EncryptingADocumentGreaterThanTheMaximumErrors(string
363
362
364
363
$ encryptOpts = [
365
364
'keyId ' => $ this ->key1Id ,
366
- 'algorithm ' => ClientEncryption::ALGORITHM_RANGE_PREVIEW ,
365
+ 'algorithm ' => ClientEncryption::ALGORITHM_RANGE ,
367
366
'contentionFactor ' => 0 ,
368
367
'rangeOpts ' => $ rangeOpts ,
369
368
];
@@ -376,7 +375,7 @@ public function testCase6_EncryptingADocumentGreaterThanTheMaximumErrors(string
376
375
}
377
376
378
377
/**
379
- * @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
378
+ * @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
380
379
* @dataProvider provideTypeAndRangeOpts
381
380
*/
382
381
public function testCase7_EncryptingAValueOfADifferentTypeErrors (string $ type , array $ rangeOpts ): void
@@ -391,7 +390,7 @@ public function testCase7_EncryptingAValueOfADifferentTypeErrors(string $type, a
391
390
392
391
$ encryptOpts = [
393
392
'keyId ' => $ this ->key1Id ,
394
- 'algorithm ' => ClientEncryption::ALGORITHM_RANGE_PREVIEW ,
393
+ 'algorithm ' => ClientEncryption::ALGORITHM_RANGE ,
395
394
'contentionFactor ' => 0 ,
396
395
'rangeOpts ' => $ rangeOpts ,
397
396
];
@@ -404,7 +403,7 @@ public function testCase7_EncryptingAValueOfADifferentTypeErrors(string $type, a
404
403
}
405
404
406
405
/**
407
- * @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
406
+ * @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
408
407
* @dataProvider provideTypeAndRangeOpts
409
408
*/
410
409
public function testCase8_SettingPrecisionErrorsIfTheTypeIsNotDoubleOrDecimal128 (string $ type , array $ rangeOpts ): void
@@ -417,7 +416,7 @@ public function testCase8_SettingPrecisionErrorsIfTheTypeIsNotDoubleOrDecimal128
417
416
418
417
$ encryptOpts = [
419
418
'keyId ' => $ this ->key1Id ,
420
- 'algorithm ' => ClientEncryption::ALGORITHM_RANGE_PREVIEW ,
419
+ 'algorithm ' => ClientEncryption::ALGORITHM_RANGE ,
421
420
'contentionFactor ' => 0 ,
422
421
'rangeOpts ' => $ rangeOpts + ['precision ' => 2 ],
423
422
];
0 commit comments