📁 File Manager Pro
v10.0.3 | PHP: 7.4.33
Server: LiteSpeed
2026-07-12 07:56:03
📂
/ (Root)
/
opt
/
alt
/
tests
/
alt-php83-pecl-mongodb_1.18.1-1.el8
/
tests
📍 /opt/alt/tests/alt-php83-pecl-mongodb_1.18.1-1.el8/tests
🔄 Refresh
✏️
Editing: serverApi-serialization_error-001.phpt
Read Only
--TEST-- MongoDB\Driver\ServerApi unserialization errors (Serializable interface) --FILE-- <?php require_once __DIR__ . '/../utils/basic.inc'; echo throws(function() { unserialize('C:24:"MongoDB\Driver\ServerApi":24:{a:1:{s:7:"version";i:0;}}'); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { unserialize('C:24:"MongoDB\Driver\ServerApi":45:{a:2:{s:7:"version";s:1:"1";s:6:"strict";i:0;}}'); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { unserialize('C:24:"MongoDB\Driver\ServerApi":57:{a:2:{s:7:"version";s:1:"1";s:17:"deprecationErrors";i:0;}}'); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== <?php exit(0); ?> --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ServerApi initialization requires "version" field to be string OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ServerApi initialization requires "strict" field to be bool or null OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\Driver\ServerApi initialization requires "deprecationErrors" field to be bool or null ===DONE===
💾 Save Changes
❌ Cancel