aboutsummaryrefslogtreecommitdiff
path: root/php/tests/encode_decode_test.php
diff options
context:
space:
mode:
authorPaul Yang <TeBoring@users.noreply.github.com>2017-03-17 11:08:06 -0700
committerGitHub <noreply@github.com>2017-03-17 11:08:06 -0700
commit6b27c1f981a9a93918e4039f236ead27165a8e91 (patch)
tree980c622c849bc84be49b70996ce4e19979ba9122 /php/tests/encode_decode_test.php
parentc0871aa49c685e3aca19244c67d54ff321a62865 (diff)
downloadprotobuf-6b27c1f981a9a93918e4039f236ead27165a8e91.tar.gz
protobuf-6b27c1f981a9a93918e4039f236ead27165a8e91.tar.bz2
protobuf-6b27c1f981a9a93918e4039f236ead27165a8e91.zip
Add file option php_class_prefix (#2849)
This option will be prepended to generated classes of all messages in the containing file.
Diffstat (limited to 'php/tests/encode_decode_test.php')
-rw-r--r--php/tests/encode_decode_test.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/php/tests/encode_decode_test.php b/php/tests/encode_decode_test.php
index ba4fff69..94adf793 100644
--- a/php/tests/encode_decode_test.php
+++ b/php/tests/encode_decode_test.php
@@ -194,7 +194,7 @@ class EncodeDecodeTest extends TestBase
{
$m = new TestMessage();
$m->setOptionalInt32(-1);
- $data = $m->encode();
+ $data = $m->serializeToString();
$this->assertSame("08ffffffffffffffffff01", bin2hex($data));
}
@@ -202,12 +202,12 @@ class EncodeDecodeTest extends TestBase
{
$m = new TestMessage();
$this->assertEquals(0, $m->getOptionalInt32());
- $m->decode(hex2bin("08ffffffffffffffffff01"));
+ $m->mergeFromString(hex2bin("08ffffffffffffffffff01"));
$this->assertEquals(-1, $m->getOptionalInt32());
$m = new TestMessage();
$this->assertEquals(0, $m->getOptionalInt32());
- $m->decode(hex2bin("08ffffffff0f"));
+ $m->mergeFromString(hex2bin("08ffffffff0f"));
$this->assertEquals(-1, $m->getOptionalInt32());
}