From 7be088202bad3a89498db2e9b19afda9f3929430 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Wed, 19 Apr 2017 20:03:34 -0700 Subject: Enum defined without package have incorrect class name. (#2988) Fix the bug by sharing the code for generating class name for both message and enum. --- php/tests/generated_class_test.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'php/tests/generated_class_test.php') diff --git a/php/tests/generated_class_test.php b/php/tests/generated_class_test.php index 39e6c6c4..41d63a60 100644 --- a/php/tests/generated_class_test.php +++ b/php/tests/generated_class_test.php @@ -1,7 +1,7 @@ setOptionalNoNamespaceMessage(new NoNameSpaceMessage()); + $m->getRepeatedNoNamespaceMessage()[] = new NoNameSpaceMessage(); } public function testEnumWithoutNamespace() { - $m = new NoNameSpaceEnum(); + $m = new TestMessage(); + $m->setOptionalNoNamespaceEnum(NoNameSpaceEnum::VALUE_A); + $m->getRepeatedNoNamespaceEnum()[] = NoNameSpaceEnum::VALUE_A; } ######################################################### -- cgit v1.2.3