mirror of
https://github.com/macintoshplus/mongo-php-driver.git
synced 2026-04-29 11:33:12 +02:00
19 lines
506 B
PHP
19 lines
506 B
PHP
--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===
|