@@ -54,6 +54,8 @@ $integerOptions = [
54
54
'serverSelectionTimeoutMS ' ,
55
55
'socketCheckIntervalMS ' ,
56
56
'socketTimeoutMS ' ,
57
+ 'srvMaxHosts ' ,
58
+ 'zlibCompressionLevel ' ,
57
59
];
58
60
59
61
$ invalidIntegerValues = [
@@ -69,7 +71,7 @@ foreach ($integerOptions as $option) {
69
71
foreach ($ invalidIntegerValues as $ value ) {
70
72
echo throws (function () use ($ option , $ value ) {
71
73
create_test_manager (null , [$ option => $ value ]);
72
- }, " MongoDB\Driver\Exception\InvalidArgumentException " ), "\n" ;
74
+ }, MongoDB \Driver \Exception \InvalidArgumentException::class ), "\n" ;
73
75
}
74
76
}
75
77
@@ -79,9 +81,14 @@ $stringOptions = [
79
81
'appname ' ,
80
82
'authMechanism ' ,
81
83
'authSource ' ,
84
+ 'compressors ' ,
82
85
'gssapiServiceName ' ,
83
86
'password ' ,
84
87
'replicaSet ' ,
88
+ 'srvServiceName ' ,
89
+ 'tlsCAFile ' ,
90
+ 'tlsCertificateKeyFile ' ,
91
+ 'tlsCertificateKeyFilePassword ' ,
85
92
'username ' ,
86
93
];
87
94
@@ -98,7 +105,7 @@ foreach ($stringOptions as $option) {
98
105
foreach ($ invalidStringValues as $ value ) {
99
106
echo throws (function () use ($ option , $ value ) {
100
107
create_test_manager (null , [$ option => $ value ]);
101
- }, " MongoDB\Driver\Exception\InvalidArgumentException " ), "\n" ;
108
+ }, MongoDB \Driver \Exception \InvalidArgumentException::class ), "\n" ;
102
109
}
103
110
}
104
111
@@ -378,6 +385,30 @@ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
378
385
Expected 32-bit integer for "socketTimeoutMS" URI option, array given
379
386
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
380
387
Expected 32-bit integer for "socketTimeoutMS" URI option, document given
388
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
389
+ Expected 32-bit integer for "srvMaxHosts" URI option, boolean given
390
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
391
+ Expected 32-bit integer for "srvMaxHosts" URI option, double given
392
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
393
+ Expected 32-bit integer for "srvMaxHosts" URI option, string given
394
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
395
+ Expected 32-bit integer for "srvMaxHosts" URI option, ObjectId given
396
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
397
+ Expected 32-bit integer for "srvMaxHosts" URI option, array given
398
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
399
+ Expected 32-bit integer for "srvMaxHosts" URI option, document given
400
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
401
+ Expected 32-bit integer for "zlibCompressionLevel" URI option, boolean given
402
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
403
+ Expected 32-bit integer for "zlibCompressionLevel" URI option, double given
404
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
405
+ Expected 32-bit integer for "zlibCompressionLevel" URI option, string given
406
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
407
+ Expected 32-bit integer for "zlibCompressionLevel" URI option, ObjectId given
408
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
409
+ Expected 32-bit integer for "zlibCompressionLevel" URI option, array given
410
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
411
+ Expected 32-bit integer for "zlibCompressionLevel" URI option, document given
381
412
382
413
Testing string options:
383
414
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
@@ -417,6 +448,18 @@ Expected string for "authSource" URI option, array given
417
448
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
418
449
Expected string for "authSource" URI option, document given
419
450
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
451
+ Expected string for "compressors" URI option, boolean given
452
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
453
+ Expected string for "compressors" URI option, double given
454
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
455
+ Expected string for "compressors" URI option, 32-bit integer given
456
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
457
+ Expected string for "compressors" URI option, ObjectId given
458
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
459
+ Expected string for "compressors" URI option, array given
460
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
461
+ Expected string for "compressors" URI option, document given
462
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
420
463
Expected string for "gssapiServiceName" URI option, boolean given
421
464
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
422
465
Expected string for "gssapiServiceName" URI option, double given
@@ -453,6 +496,54 @@ Expected string for "replicaSet" URI option, array given
453
496
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
454
497
Expected string for "replicaSet" URI option, document given
455
498
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
499
+ Expected string for "srvServiceName" URI option, boolean given
500
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
501
+ Expected string for "srvServiceName" URI option, double given
502
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
503
+ Expected string for "srvServiceName" URI option, 32-bit integer given
504
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
505
+ Expected string for "srvServiceName" URI option, ObjectId given
506
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
507
+ Expected string for "srvServiceName" URI option, array given
508
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
509
+ Expected string for "srvServiceName" URI option, document given
510
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
511
+ Expected string for "tlsCAFile" URI option, boolean given
512
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
513
+ Expected string for "tlsCAFile" URI option, double given
514
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
515
+ Expected string for "tlsCAFile" URI option, 32-bit integer given
516
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
517
+ Expected string for "tlsCAFile" URI option, ObjectId given
518
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
519
+ Expected string for "tlsCAFile" URI option, array given
520
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
521
+ Expected string for "tlsCAFile" URI option, document given
522
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
523
+ Expected string for "tlsCertificateKeyFile" URI option, boolean given
524
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
525
+ Expected string for "tlsCertificateKeyFile" URI option, double given
526
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
527
+ Expected string for "tlsCertificateKeyFile" URI option, 32-bit integer given
528
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
529
+ Expected string for "tlsCertificateKeyFile" URI option, ObjectId given
530
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
531
+ Expected string for "tlsCertificateKeyFile" URI option, array given
532
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
533
+ Expected string for "tlsCertificateKeyFile" URI option, document given
534
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
535
+ Expected string for "tlsCertificateKeyFilePassword" URI option, boolean given
536
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
537
+ Expected string for "tlsCertificateKeyFilePassword" URI option, double given
538
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
539
+ Expected string for "tlsCertificateKeyFilePassword" URI option, 32-bit integer given
540
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
541
+ Expected string for "tlsCertificateKeyFilePassword" URI option, ObjectId given
542
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
543
+ Expected string for "tlsCertificateKeyFilePassword" URI option, array given
544
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
545
+ Expected string for "tlsCertificateKeyFilePassword" URI option, document given
546
+ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
456
547
Expected string for "username" URI option, boolean given
457
548
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
458
549
Expected string for "username" URI option, double given
0 commit comments