📁 File Manager Pro
v10.0.3 | PHP: 7.4.33
Server: LiteSpeed
2026-07-12 06:34:13
📂
/ (Root)
/
opt
/
alt
/
tests
/
alt-php84-pecl-mongodb_1.20.0-2.el8
/
tests
📍 /opt/alt/tests/alt-php84-pecl-mongodb_1.20.0-2.el8/tests
🔄 Refresh
✏️
Editing: standalone-auth_error-001.phpt
Read Only
--TEST-- Connect to MongoDB with using default auth mechanism and wrong password --SKIPIF-- <?php require __DIR__ . "/../utils/basic-skipif.inc"; ?> <?php skip_if_not_auth(); ?> <?php skip_if_not_auth_mechanism(null); ?> <?php skip_if_not_clean(); ?> --FILE-- <?php require_once __DIR__ . "/../utils/basic.inc"; $username = "root"; $password = "the-wrong-password"; $database = "admin"; $parsed = parse_url(URI); $dsn = sprintf("mongodb://%s:%s@%s:%d/%s", $username, $password, $parsed["host"], $parsed["port"], $database); $manager = create_test_manager($dsn); $bulk = new MongoDB\Driver\BulkWrite; $bulk->insert(array("my" => "value")); echo throws(function() use($manager, $bulk) { $manager->executeBulkWrite(NS, $bulk); }, 'MongoDB\Driver\Exception\BulkWriteException'), "\n"; ?> ===DONE=== <?php exit(0); ?> --EXPECT-- OK: Got MongoDB\Driver\Exception\BulkWriteException Bulk write failed due to previous MongoDB\Driver\Exception\AuthenticationException: Authentication failed. ===DONE===
💾 Save Changes
❌ Cancel