aboutsummaryrefslogtreecommitdiff
path: root/php/tests/generated_class_test.php
diff options
context:
space:
mode:
authorPaul Yang <TeBoring@users.noreply.github.com>2016-10-11 10:36:25 -0700
committerGitHub <noreply@github.com>2016-10-11 10:36:25 -0700
commit60d95f36c0081a03b947c2b625c10841bb19736c (patch)
tree18a505eb1da4f6072afb9344af72880f0d789d3a /php/tests/generated_class_test.php
parent0321baf9e855a2b664436605c7067f348e1d7284 (diff)
downloadprotobuf-60d95f36c0081a03b947c2b625c10841bb19736c.tar.gz
protobuf-60d95f36c0081a03b947c2b625c10841bb19736c.tar.bz2
protobuf-60d95f36c0081a03b947c2b625c10841bb19736c.zip
Fix the bug that message without namespace is not found in the descriptor pool. (#2240)
Diffstat (limited to 'php/tests/generated_class_test.php')
-rw-r--r--php/tests/generated_class_test.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/php/tests/generated_class_test.php b/php/tests/generated_class_test.php
index 56466cae..d1a0bd51 100644
--- a/php/tests/generated_class_test.php
+++ b/php/tests/generated_class_test.php
@@ -1,6 +1,7 @@
<?php
require_once('test.pb.php');
+require_once('test_no_namespace.pb.php');
require_once('test_util.php');
use Google\Protobuf\Internal\RepeatedField;
@@ -554,4 +555,12 @@ class GeneratedClassTest extends PHPUnit_Framework_TestCase
$this->assertSame('', $m->getOneofString());
$this->assertSame(1, $m->getOneofMessage()->getA());
}
+
+ #########################################################
+ # Test oneof field.
+ #########################################################
+
+ public function testMessageWithoutNamespace() {
+ $m = new NoNameSpace();
+ }
}