File manager - Edit - /opt/cpanel/ea-php74/root/usr/share/tests/pecl/mongodb/tests/manager/manager-ctor_error-004.phpt
Back
--TEST-- MongoDB\Driver\Manager::__construct(): empty replicaSet argument --FILE-- <?php require_once __DIR__ . "/../utils/basic.inc"; echo throws(function () { $manager = create_test_manager('mongodb://localhost:27017/?replicaSet='); $manager->executeQuery(NS, new MongoDB\Driver\Query([])); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; echo throws(function () { $manager = create_test_manager('mongodb://localhost:27017', ['replicaSet' => '']); $manager->executeQuery(NS, new MongoDB\Driver\Query([])); }, MongoDB\Driver\Exception\InvalidArgumentException::class), "\n"; ?> ===DONE=== <?php exit(0); ?> --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse MongoDB URI: 'mongodb://localhost:27017/?replicaSet='. Value for URI option "replicaset" cannot be empty string. OK: Got MongoDB\Driver\Exception\InvalidArgumentException Value for URI option "replicaSet" cannot be empty string. ===DONE===
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings