File manager - Edit - /opt/cpanel/ea-php74/root/usr/share/tests/pecl/mongodb/tests/bson/bson-binary-set_state_error-001.phpt
Back
--TEST-- MongoDB\BSON\Binary::__set_state() requires "data" string and "type" integer fields --FILE-- <?php require_once __DIR__ . '/../utils/basic.inc'; echo throws(function() { MongoDB\BSON\Binary::__set_state(['data' => 'foobar']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Binary::__set_state(['type' => 0]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; echo throws(function() { MongoDB\BSON\Binary::__set_state(['data' => 0, 'type' => 'foobar']); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== <?php exit(0); ?> --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Binary initialization requires "data" string and "type" integer fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Binary initialization requires "data" string and "type" integer fields OK: Got MongoDB\Driver\Exception\InvalidArgumentException MongoDB\BSON\Binary initialization requires "data" string and "type" integer fields ===DONE===
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings