aboutsummaryrefslogtreecommitdiff
path: root/php/tests/test_util.php
diff options
context:
space:
mode:
authorPaul Yang <TeBoring@users.noreply.github.com>2016-10-10 13:58:39 -0700
committerGitHub <noreply@github.com>2016-10-10 13:58:39 -0700
commitfd046f6263fb17383cafdbb25c361e3451c31105 (patch)
tree5879fa426bd0cf22df5a7ee39d25b8ece7c117f8 /php/tests/test_util.php
parent337a028bb65ccca4dda768695950b5aba53ae2c9 (diff)
parentdaba6653f1289b58873c2ae993afcdb82035d2fb (diff)
downloadprotobuf-fd046f6263fb17383cafdbb25c361e3451c31105.tar.gz
protobuf-fd046f6263fb17383cafdbb25c361e3451c31105.tar.bz2
protobuf-fd046f6263fb17383cafdbb25c361e3451c31105.zip
Merge pull request #2234 from TeBoring/master
Merge 3.1.x branch into master.
Diffstat (limited to 'php/tests/test_util.php')
-rw-r--r--php/tests/test_util.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/php/tests/test_util.php b/php/tests/test_util.php
index decd1a78..2f6e4dd8 100644
--- a/php/tests/test_util.php
+++ b/php/tests/test_util.php
@@ -50,6 +50,8 @@ class TestUtil
public static function setTestMessage(TestMessage $m)
{
+ $sub = new TestMessage_Sub();
+
$m->setOptionalInt32(-42);
$m->setOptionalInt64(-43);
$m->setOptionalUint32(42);
@@ -66,7 +68,7 @@ class TestUtil
$m->setOptionalString('a');
$m->setOptionalBytes('b');
$m->setOptionalEnum(TestEnum::ONE);
- $m->setOptionalMessage(new TestMessage_Sub());
+ $m->setOptionalMessage($sub);
$m->getOptionalMessage()->SetA(33);
$m->getRepeatedInt32() []= -42;