aboutsummaryrefslogtreecommitdiffhomepage
path: root/php/tests/proto
diff options
context:
space:
mode:
authorGravatar Paul Yang <TeBoring@users.noreply.github.com>2017-04-19 20:03:34 -0700
committerGravatar GitHub <noreply@github.com>2017-04-19 20:03:34 -0700
commit7be088202bad3a89498db2e9b19afda9f3929430 (patch)
treeb3c027b951251e4e80d173acf0655a3c333ceb24 /php/tests/proto
parent190b5270c8717ca343db42da489e5e7d6d9efb2c (diff)
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.
Diffstat (limited to 'php/tests/proto')
-rw-r--r--php/tests/proto/test.proto6
-rw-r--r--php/tests/proto/test_no_namespace.proto4
2 files changed, 8 insertions, 2 deletions
diff --git a/php/tests/proto/test.proto b/php/tests/proto/test.proto
index 1a47a3f2..cc9bf8c8 100644
--- a/php/tests/proto/test.proto
+++ b/php/tests/proto/test.proto
@@ -1,6 +1,7 @@
syntax = "proto3";
import 'proto/test_include.proto';
+import 'proto/test_no_namespace.proto';
import 'proto/test_prefix.proto';
package foo;
@@ -96,6 +97,11 @@ message TestMessage {
// Reserved for non-existing field test.
// int32 non_exist = 89;
+
+ NoNamespaceMessage optional_no_namespace_message = 91;
+ NoNamespaceEnum optional_no_namespace_enum = 92;
+ repeated NoNamespaceMessage repeated_no_namespace_message = 93;
+ repeated NoNamespaceEnum repeated_no_namespace_enum = 94;
}
enum TestEnum {
diff --git a/php/tests/proto/test_no_namespace.proto b/php/tests/proto/test_no_namespace.proto
index b8c4fdf2..b0f66002 100644
--- a/php/tests/proto/test_no_namespace.proto
+++ b/php/tests/proto/test_no_namespace.proto
@@ -1,10 +1,10 @@
syntax = "proto3";
-message NoNameSpaceMessage {
+message NoNamespaceMessage {
int32 a = 1;
}
-enum NoNameSpaceEnum {
+enum NoNamespaceEnum {
VALUE_A = 0;
VALUE_B = 1;
}