Viewing File: /opt/alt/tests/alt-php82-pecl-mongodb_1.18.1-1.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
<