aboutsummaryrefslogtreecommitdiff
path: root/php/tests/test_base.php
diff options
context:
space:
mode:
authorPaul Yang <TeBoring@users.noreply.github.com>2017-06-30 12:14:09 -0700
committerGitHub <noreply@github.com>2017-06-30 12:14:09 -0700
commitecca6ea95d56a6f70ff7b223ec3f904758acc8b1 (patch)
tree728f4aff0d5f00c78a741cf737ea6de58f4ba645 /php/tests/test_base.php
parent5a52b3588d35d2fa0b9ce4eda5630546966a26b4 (diff)
downloadprotobuf-ecca6ea95d56a6f70ff7b223ec3f904758acc8b1.tar.gz
protobuf-ecca6ea95d56a6f70ff7b223ec3f904758acc8b1.tar.bz2
protobuf-ecca6ea95d56a6f70ff7b223ec3f904758acc8b1.zip
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
Diffstat (limited to 'php/tests/test_base.php')
-rw-r--r--php/tests/test_base.php3
1 files changed, 3 insertions, 0 deletions
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());