관리-도구
편집 파일: document-decodeError-003.phpt
--TEST-- Document type (sub-documents): Invalid subdocument: bad string length in field --DESCRIPTION-- Generated by scripts/convert-bson-corpus-tests.php DO NOT EDIT THIS FILE --FILE-- <?php require_once __DIR__ . '/../utils/basic.inc'; $bson = hex2bin('1C00000003666F6F001200000002626172000500000062617A000000'); throws(function() use ($bson) { MongoDB\BSON\Document::fromBSON($bson)->toPHP(); }, 'MongoDB\Driver\Exception\UnexpectedValueException'); ?> ===DONE=== <?php exit(0); ?> --EXPECT-- OK: Got MongoDB\Driver\Exception\UnexpectedValueException ===DONE===