From ecca6ea95d56a6f70ff7b223ec3f904758acc8b1 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Fri, 30 Jun 2017 12:14:09 -0700 Subject: Add json encode/decode for php. (#3226) * Add json encode/decode for php. * Fix php conformance test on 32-bit machines. * Fix conformance test for c extension. * Fix comments --- php/tests/test_base.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'php/tests/test_base.php') diff --git a/php/tests/test_base.php b/php/tests/test_base.php index 67048f4c..dc5e73f5 100644 --- a/php/tests/test_base.php +++ b/php/tests/test_base.php @@ -19,6 +19,8 @@ class TestBase extends PHPUnit_Framework_TestCase public function expectFields(TestMessage $m) { + $this->assertSame(-42, $m->getOptionalInt32()); + $this->assertSame(42, $m->getOptionalUint32()); $this->assertSame(-44, $m->getOptionalSint32()); $this->assertSame(46, $m->getOptionalFixed32()); $this->assertSame(-46, $m->getOptionalSfixed32()); @@ -27,6 +29,7 @@ class TestBase extends PHPUnit_Framework_TestCase $this->assertSame(true, $m->getOptionalBool()); $this->assertSame('a', $m->getOptionalString()); $this->assertSame('b', $m->getOptionalBytes()); + $this->assertSame(TestEnum::ONE, $m->getOptionalEnum()); $this->assertSame(33, $m->getOptionalMessage()->getA()); if (PHP_INT_SIZE == 4) { $this->assertSame('-43', $m->getOptionalInt64()); -- cgit v1.2.3