📁 File Manager Pro
v10.0.3 | PHP: 7.4.33
Server: LiteSpeed
2026-07-12 05:53:17
📂
/ (Root)
/
opt
/
alt
/
tests
/
alt-php82-pecl-mongodb_1.18.1-1.el8
/
tests
📍 /opt/alt/tests/alt-php82-pecl-mongodb_1.18.1-1.el8/tests
🔄 Refresh
✏️
Editing: query-ctor_error-001.phpt
Read Only
--TEST-- MongoDB\Driver\Query construction (invalid readConcern type) --FILE-- <?php require_once __DIR__ . "/../utils/basic.inc"; $tests = [ 1, 1.0, 'string', true, [], new stdClass, null, ]; foreach ($tests as $test) { echo throws(function() use ($test) { new MongoDB\Driver\Query([], ['readConcern' => $test]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; } ?> ===DONE=== <?php exit(0); ?> --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, int given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, float given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, string given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, bool given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, array given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, stdClass given OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected "readConcern" option to be MongoDB\Driver\ReadConcern, null given ===DONE===
💾 Save Changes
❌ Cancel