Skip to content

Commit dca4acf

Browse files
committed
Update tests for unsupported URI option values
The error message was changed in mongodb/mongo-c-driver@a625b39
1 parent 9624951 commit dca4acf

6 files changed

+7
-7
lines changed

tests/manager/manager-ctor-read_preference-error-001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ echo throws(function() {
5050
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
5151
Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?readPreference=1'. Unsupported readPreference value [readPreference=1].
5252
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
53-
Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?readPreference=secondary&readPreferenceTags=invalid'. Unknown option or value for 'readPreferenceTags=invalid'.
53+
Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?readPreference=secondary&readPreferenceTags=invalid'. Unsupported value for "readPreferenceTags": "invalid".
5454
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
5555
Expected string for "readPreference" URI option, 32-bit integer given
5656
OK: Got MongoDB\Driver\Exception\InvalidArgumentException

tests/manager/manager-ctor-read_preference-error-002.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ echo throws(function() {
5656
<?php exit(0); ?>
5757
--EXPECT--
5858
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
59-
Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?readPreference=secondary&maxStalenessSeconds=invalid'. Unknown option or value for 'maxStalenessSeconds=invalid'.
59+
Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?readPreference=secondary&maxStalenessSeconds=invalid'. Unsupported value for "maxStalenessSeconds": "invalid".
6060
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
6161
Expected integer for "maxStalenessSeconds" URI option, string given
6262
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
63-
Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?readPreference=secondary&maxStalenessSeconds=2147483648'. Unknown option or value for 'maxStalenessSeconds=2147483648'.
63+
Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?readPreference=secondary&maxStalenessSeconds=2147483648'. Unsupported value for "maxStalenessSeconds": "2147483648".
6464
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
6565
Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?maxstalenessseconds=1231'. Invalid readPreferences.
6666
OK: Got MongoDB\Driver\Exception\InvalidArgumentException

tests/manager/manager-ctor-read_preference-error-003.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ echo throws(function() {
1818
<?php exit(0); ?>
1919
--EXPECT--
2020
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
21-
Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?slaveok=other'. Unknown option or value for 'slaveok=other'.
21+
Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?slaveok=other'. Unsupported value for "slaveok": "other".
2222
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
2323
Expected boolean for "slaveOk" URI option, 32-bit integer given
2424
===DONE===

tests/manager/manager-ctor-write_concern-error-003.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ echo throws(function() {
1919
<?php exit(0); ?>
2020
--EXPECT--
2121
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
22-
Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?wtimeoutms=invalid'. Unknown option or value for 'wtimeoutms=invalid'.
22+
Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?wtimeoutms=invalid'. Unsupported value for "wtimeoutms": "invalid".
2323
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
2424
Expected 32-bit integer for "wTimeoutMS" URI option, string given
2525
===DONE===

tests/manager/manager-ctor-write_concern-error-005.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ echo throws(function() {
5454
<?php exit(0); ?>
5555
--EXPECT--
5656
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
57-
Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?journal=invalid'. Unknown option or value for 'journal=invalid'.
57+
Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?journal=invalid'. Unsupported value for "journal": "invalid".
5858
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
5959
Expected boolean for "journal" URI option, string given
6060
OK: Got MongoDB\Driver\Exception\InvalidArgumentException

tests/manager/manager-ctor-write_concern-error-006.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ echo throws(function() {
2020
<?php exit(0); ?>
2121
--EXPECT--
2222
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
23-
Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?safe=invalid'. Unknown option or value for 'safe=invalid'.
23+
Failed to parse MongoDB URI: 'mongodb://127.0.0.1/?safe=invalid'. Unsupported value for "safe": "invalid".
2424
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
2525
Expected boolean for "safe" URI option, string given
2626
===DONE===

0 commit comments

Comments
 (0)