diff options
author | Bo Yang <teboring@google.com> | 2017-01-10 11:00:03 -0800 |
---|---|---|
committer | Bo Yang <teboring@google.com> | 2017-01-10 11:00:23 -0800 |
commit | 60d4f8af483e0234ee5b7f7544bcd578a34412ad (patch) | |
tree | 0e1ff689e6f425d69b3af689cf3e5b4458b6c75e /php/tests/encode_decode_test.php | |
parent | e259b515a5baae2d7d7623af62ea87079a5e91a0 (diff) | |
download | protobuf-60d4f8af483e0234ee5b7f7544bcd578a34412ad.tar.gz protobuf-60d4f8af483e0234ee5b7f7544bcd578a34412ad.tar.bz2 protobuf-60d4f8af483e0234ee5b7f7544bcd578a34412ad.zip |
Decoding unknown field should succeed.
Diffstat (limited to 'php/tests/encode_decode_test.php')
-rw-r--r-- | php/tests/encode_decode_test.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/php/tests/encode_decode_test.php b/php/tests/encode_decode_test.php index 7bb75336..992f1631 100644 --- a/php/tests/encode_decode_test.php +++ b/php/tests/encode_decode_test.php @@ -167,4 +167,10 @@ class EncodeDecodeTest extends TestBase $this->assertEquals($original, $msg->getOptionalInt64()); } } + + public function testDecodeFieldNonExist() { + $data = hex2bin('c80501'); + $m = new TestMessage(); + $m->decode($data); + } } |