Viewing File: /opt/alt/tests/alt-php84-pecl-mongodb_1.20.0-2.el8/tests/bson-unknown-001.phpt
--TEST--
BSON Serializing a PHP resource should throw exception
--FILE--
<?php
require_once __DIR__ . '/../utils/basic.inc';
throws(function() {
$a = array("stderr" => STDERR);
$b = fromPHP($a);
}, "MongoDB\Driver\Exception\UnexpectedValueException");
throws(function() {
$a = array("stderr" => STDERR, "stdout" => STDOUT);
$b = fromPHP($a);
}, "MongoDB\Driver\Exception\UnexpectedValueException");
?>
===DONE===
<?php exit(0); ?>
--EXPECT--
OK: Got MongoDB\Driver\Exception\UnexpectedValueException
OK: Got MongoDB\Driver\Exception\UnexpectedValueException
===DONE===
Back to Directory
File Manager
<