Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
proc
/
thread-self
/
root
/
opt
/
php-8.3
/
share
/
test
/
mongodb
/
tests
/
bson
/
//proc/thread-self/root/opt/php-8.3/share/test/mongodb/tests/bson/bson-enum_error-006.phpt
--TEST-- Non-backed enums cannot be serialized --FILE-- <?php require_once __DIR__ . '/../utils/basic.inc'; enum MyEnum { case A; } echo throws(function() { fromPHP(['x' => MyEnum::A]); }, MongoDB\Driver\Exception\UnexpectedValueException::class), "\n"; ?> ===DONE=== <?php exit(0); ?> --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException Non-backed enum MyEnum cannot be serialized for field path "x" ===DONE===