Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
opt
/
php-7.0
/
share
/
test
/
mongodb
/
tests
/
bson
/
//opt/php-7.0/share/test/mongodb/tests/bson/bson-javascript-set_state_error-002.phpt
--TEST-- MongoDB\BSON\Javascript::__set_state() expects optional scope to be array or object --FILE-- <?php require_once __DIR__ . '/../utils/tools.php'; echo throws(function() { MongoDB\BSON\Javascript::__set_state(['code' => 'function foo() {}', 'scope' => 'INVALID']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== <?php exit(0); ?> --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException Expected scope to be array or object, string given ===DONE===