aboutsummaryrefslogtreecommitdiff
path: root/php/tests/well_known_test.php
diff options
context:
space:
mode:
authorPaul Yang <TeBoring@users.noreply.github.com>2017-04-20 16:55:56 -0700
committerGitHub <noreply@github.com>2017-04-20 16:55:56 -0700
commit4523c9c233dbb61d03996a5bbe25d1b5aea51f7f (patch)
treebebedd58dac1966bc462c00dfc39b1fea5deb6c6 /php/tests/well_known_test.php
parent4c57e8475f78ccac80407f03c2d23d30014785f9 (diff)
downloadprotobuf-4523c9c233dbb61d03996a5bbe25d1b5aea51f7f.tar.gz
protobuf-4523c9c233dbb61d03996a5bbe25d1b5aea51f7f.tar.bz2
protobuf-4523c9c233dbb61d03996a5bbe25d1b5aea51f7f.zip
Allow proto files to import descriptor.proto (#2995)
descriptor.proto uses proto2 syntax, which is not ready for external usage. However, some proto3 files import descriptor.proto and cannot be used. In this PR, all references (We cheated by only removing extensions, which is enough for now. User should avoid using messages defined in descriptor.proto as field type.) to content in descriptor.proto are removed from generated files. Those that import descriptor.proto can be used like other proto files.
Diffstat (limited to 'php/tests/well_known_test.php')
-rw-r--r--php/tests/well_known_test.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/php/tests/well_known_test.php b/php/tests/well_known_test.php
index 40ff1c8f..0c2aec13 100644
--- a/php/tests/well_known_test.php
+++ b/php/tests/well_known_test.php
@@ -4,8 +4,14 @@ use Google\Protobuf\GPBEmpty;
class WellKnownTest extends PHPUnit_Framework_TestCase {
- public function testNone() {
- $msg = new GPBEmpty();
+ public function testNone()
+ {
+ $msg = new GPBEmpty();
+ }
+
+ public function testImportDescriptorProto()
+ {
+ $msg = new TestImportDescriptorProto();
}
}