Files
mongo-php-driver/tests/bson-corpus/top-parseError-041.phpt
T
Jeremy Mikola 93bd10bd21 PHPC-1897: Test serialization of BSON with embedded null bytes in strings (#1255)
* BSON corpus prose tests for null bytes

For tests that already existed we just add a reference to the prose test

* BSON corpus tests for null bytes

Synced with mongodb/specifications@c64fc79899

This sync also removes some old DBRef tests, which should have been removed in 6929bcb608.

* Bump libmongoc to 1.19.1 to pull in changes from CDRIVER-4083
2021-10-25 13:27:33 -04:00

21 lines
440 B
PHP

--TEST--
Top-level document validity: Null byte in document key
--DESCRIPTION--
Generated by scripts/convert-bson-corpus-tests.php
DO NOT EDIT THIS FILE
--FILE--
<?php
require_once __DIR__ . '/../utils/basic.inc';
throws(function() {
fromJSON('{"a\\u0000": 1 }');
}, 'MongoDB\Driver\Exception\UnexpectedValueException');
?>
===DONE===
<?php exit(0); ?>
--EXPECT--
OK: Got MongoDB\Driver\Exception\UnexpectedValueException
===DONE===