--TEST-- MongoDB\Driver\BulkWrite::update() with invalid replacement document --FILE-- update(['x' => 1], ['' => 1]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n\n"; echo throws(function() use ($bulk) { $bulk->update(['x' => 1], ["\xc3\x28" => 1]); }, 'MongoDB\Driver\Exception\InvalidArgumentException'), "\n"; ?> ===DONE=== --EXPECT-- OK: Got MongoDB\Driver\Exception\InvalidArgumentException invalid argument for replace: empty key OK: Got MongoDB\Driver\Exception\InvalidArgumentException invalid argument for replace: corrupt BSON ===DONE===