diff options
author | Paul Yang <TeBoring@users.noreply.github.com> | 2017-08-02 18:33:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-02 18:33:25 -0700 |
commit | 25672c175792f707c71c9aa9fcd29cab31c757fa (patch) | |
tree | 8694aeec1617ab1c1fd07473878bd1ac4d085a58 /php/tests/descriptors_test.php | |
parent | 9df89ccabcf8ad7d634009a00faf0e9ba153bdb7 (diff) |
Add getClass for php Descriptor in c extension (#3443)
Diffstat (limited to 'php/tests/descriptors_test.php')
-rw-r--r-- | php/tests/descriptors_test.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/php/tests/descriptors_test.php b/php/tests/descriptors_test.php index c3833c24..17e8a4f2 100644 --- a/php/tests/descriptors_test.php +++ b/php/tests/descriptors_test.php @@ -75,9 +75,12 @@ class DescriptorsTest extends TestBase public function testDescriptor() { $pool = DescriptorPool::getGeneratedPool(); - $desc = $pool->getDescriptorByClassName(get_class(new TestDescriptorsMessage())); + $class = get_class(new TestDescriptorsMessage()); + $this->assertSame('Descriptors\TestDescriptorsMessage', $class); + $desc = $pool->getDescriptorByClassName($class); $this->assertSame('descriptors.TestDescriptorsMessage', $desc->getFullName()); + $this->assertSame($class, $desc->getClass()); $this->assertInstanceOf('\Google\Protobuf\FieldDescriptor', $desc->getField(0)); $this->assertSame(7, $desc->getFieldCount()); |