📁 File Manager Pro
v10.0.3 | PHP: 7.4.33
Server: LiteSpeed
2026-06-26 13:59:41
📂
/ (Root)
/
opt
/
alt
/
tests
/
alt-php85-pecl-mongodb_2.3.1-1.el8
/
tests
📍 /opt/alt/tests/alt-php85-pecl-mongodb_2.3.1-1.el8/tests
🔄 Refresh
✏️
Editing: bulkwritecommand-updateOne_error-004.phpt
Read Only
--TEST-- MongoDB\Driver\BulkWriteCommand::updateOne() with BSON encoding error (invalid UTF-8 string) --FILE-- <?php require_once __DIR__ . '/../utils/basic.inc'; $bulk = new MongoDB\Driver\BulkWriteCommand; echo throws(function() use ($bulk) { $bulk->updateOne(NS, ['x' => "\xc3\x28"], ['x' => 1]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->updateOne(NS, ['x' => 1], ['x' => "\xc3\x28"]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->updateOne(NS, ['x' => 1], ['$set' => ['x' => "\xc3\x28"]]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->updateOne(NS, ['x' => 1], ['y' => 1], ['collation' => ['locale' => "\xc3\x28"]]); }, 'MongoDB\Driver\Exception\UnexpectedValueException'), "\n"; ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected invalid UTF-8 for field path "x": %s OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected invalid UTF-8 for field path "x": %s OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected invalid UTF-8 for field path "$set.x": %s OK: Got MongoDB\Driver\Exception\UnexpectedValueException Detected invalid UTF-8 for field path "locale": %s ===DONE===
💾 Save Changes
❌ Cancel