diff options
author | Paul Yang <TeBoring@users.noreply.github.com> | 2017-04-20 01:19:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-20 01:19:03 -0700 |
commit | 4c57e8475f78ccac80407f03c2d23d30014785f9 (patch) | |
tree | fa9c6ca31796db77c3367acac83233a44938e117 /php/tests/generated_class_test.php | |
parent | b97cd573e405dd511b09a9fae124427a29741395 (diff) | |
download | protobuf-4c57e8475f78ccac80407f03c2d23d30014785f9.tar.gz protobuf-4c57e8475f78ccac80407f03c2d23d30014785f9.tar.bz2 protobuf-4c57e8475f78ccac80407f03c2d23d30014785f9.zip |
Prepend "PB" to generated classes whose name are reserved words. (#2990)
Diffstat (limited to 'php/tests/generated_class_test.php')
-rw-r--r-- | php/tests/generated_class_test.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/php/tests/generated_class_test.php b/php/tests/generated_class_test.php index c5dee2d6..554d2bea 100644 --- a/php/tests/generated_class_test.php +++ b/php/tests/generated_class_test.php @@ -865,4 +865,15 @@ class GeneratedClassTest extends TestBase $m->setPrefixMessage($n); $this->assertSame(1, $m->getPrefixMessage()->getA()); } + + ######################################################### + # Test prefix for reserved words. + ######################################################### + + public function testPrefixForReservedWords() + { + $m = new \Foo\TestMessage_Empty(); + $m = new \Foo\PBEmpty(); + $m = new \PrefixEmpty(); + } } |