File manager - Edit - /opt/cpanel/ea-php74/root/usr/share/tests/pecl/mongodb/tests/manager/manager-executeCommand_error-003.phpt
Back
--TEST-- MongoDB\Driver\Manager::executeCommand() connection error --FILE-- <?php require_once __DIR__ . "/../utils/basic.inc"; $manager = create_test_manager("mongodb://localhost:44444/?serverselectiontimeoutms=10"); $command = new MongoDB\Driver\Command(['ping' => 1]); echo throws(function() use($manager, $command) { $manager->executeCommand('test', $command); }, "MongoDB\Driver\Exception\ConnectionTimeoutException"), "\n"; ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- OK: Got MongoDB\Driver\Exception\ConnectionTimeoutException No suitable servers found (`serverSelectionTryOnce` set): %s ===DONE===
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings