aboutsummaryrefslogtreecommitdiff
path: root/php/tests/test_util.php
diff options
context:
space:
mode:
authorStanley Cheung <stanley.cheung@gmail.com>2016-09-22 17:09:32 -0700
committerBo Yang <teboring@google.com>2016-10-10 11:44:21 -0700
commit9372292b2940bba4e69904744eee358f0bcfc436 (patch)
tree9beffe7bdc7dadff72f304b805948326019bbdab /php/tests/test_util.php
parentf933d10fbe701df5166ca18764e4ef0922559b66 (diff)
downloadprotobuf-9372292b2940bba4e69904744eee358f0bcfc436.tar.gz
protobuf-9372292b2940bba4e69904744eee358f0bcfc436.tar.bz2
protobuf-9372292b2940bba4e69904744eee358f0bcfc436.zip
PHP: support 7.0 on PHP implementation (#2162)
* PHP: support 7.0 * Also fix in test_util.php
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;