Lines Matching refs:this

53         $this->assertInstanceOf('\Google\Protobuf\Descriptor', $desc);
56 $this->assertInstanceOf('\Google\Protobuf\EnumDescriptor', $enumDesc);
64 $this->assertNull($desc);
67 $this->assertNull($desc);
70 $this->assertNull($enumDesc);
81 $this->assertSame('Descriptors\TestDescriptorsMessage', $class);
84 $this->assertSame('descriptors.TestDescriptorsMessage', $desc->getFullName());
85 $this->assertSame($class, $desc->getClass());
87 $this->assertInstanceOf('\Google\Protobuf\FieldDescriptor', $desc->getField(0));
88 $this->assertSame(7, $desc->getFieldCount());
90 $this->assertInstanceOf('\Google\Protobuf\OneofDescriptor', $desc->getOneofDecl(0));
91 $this->assertSame(1, $desc->getOneofDeclCount());
98 $this->assertSame('Foo\TestMessage', $class);
102 $this->assertSame('Bar\TestInclude', $subdesc->getClass());
111 // WARNINIG - we need to do this so that TestDescriptorsEnum is registered!!?
122 $this->assertInstanceOf('\Google\Protobuf\EnumValueDescriptor', $enumValueDesc);
126 $this->assertSame('ZERO', $enumDescMap[0]);
127 $this->assertSame('ONE', $enumDescMap[1]);
129 $this->assertSame(2, $enumDesc->getValueCount());
141 $fieldDescMap = $this->buildFieldMap($desc);
145 $this->assertSame('optional_int32', $fieldDesc->getName());
146 $this->assertSame(1, $fieldDesc->getNumber());
147 $this->assertSame(self::GPBLABEL_OPTIONAL, $fieldDesc->getLabel());
148 $this->assertSame(self::GPBTYPE_INT32, $fieldDesc->getType());
149 $this->assertFalse($fieldDesc->isMap());
153 $this->assertSame('optional_enum', $fieldDesc->getName());
154 $this->assertSame(16, $fieldDesc->getNumber());
155 $this->assertSame(self::GPBLABEL_OPTIONAL, $fieldDesc->getLabel());
156 $this->assertSame(self::GPBTYPE_ENUM, $fieldDesc->getType());
157 $this->assertInstanceOf('\Google\Protobuf\EnumDescriptor', $fieldDesc->getEnumType());
158 $this->assertFalse($fieldDesc->isMap());
162 $this->assertSame('optional_message', $fieldDesc->getName());
163 $this->assertSame(17, $fieldDesc->getNumber());
164 $this->assertSame(self::GPBLABEL_OPTIONAL, $fieldDesc->getLabel());
165 $this->assertSame(self::GPBTYPE_MESSAGE, $fieldDesc->getType());
166 $this->assertInstanceOf('\Google\Protobuf\Descriptor', $fieldDesc->getMessageType());
167 $this->assertFalse($fieldDesc->isMap());
171 $this->assertSame('repeated_int32', $fieldDesc->getName());
172 $this->assertSame(31, $fieldDesc->getNumber());
173 $this->assertSame(self::GPBLABEL_REPEATED, $fieldDesc->getLabel());
174 $this->assertSame(self::GPBTYPE_INT32, $fieldDesc->getType());
175 $this->assertFalse($fieldDesc->isMap());
179 $this->assertSame('repeated_message', $fieldDesc->getName());
180 $this->assertSame(47, $fieldDesc->getNumber());
181 $this->assertSame(self::GPBLABEL_REPEATED, $fieldDesc->getLabel());
182 $this->assertSame(self::GPBTYPE_MESSAGE, $fieldDesc->getType());
183 $this->assertInstanceOf('\Google\Protobuf\Descriptor', $fieldDesc->getMessageType());
184 $this->assertFalse($fieldDesc->isMap());
189 $this->assertSame('oneof_int32', $fieldDesc->getName());
190 $this->assertSame(51, $fieldDesc->getNumber());
191 $this->assertSame(self::GPBLABEL_OPTIONAL, $fieldDesc->getLabel());
192 $this->assertSame(self::GPBTYPE_INT32, $fieldDesc->getType());
193 $this->assertFalse($fieldDesc->isMap());
197 $this->assertSame('map_int32_enum', $fieldDesc->getName());
198 $this->assertSame(71, $fieldDesc->getNumber());
199 $this->assertSame(self::GPBLABEL_REPEATED, $fieldDesc->getLabel());
200 $this->assertSame(self::GPBTYPE_MESSAGE, $fieldDesc->getType());
201 $this->assertTrue($fieldDesc->isMap());
203 $this->assertSame('descriptors.TestDescriptorsMessage.MapInt32EnumEntry', $mapDesc->getFullName());
204 $this->assertSame(self::GPBTYPE_INT32, $mapDesc->getField(0)->getType());
205 $this->assertSame(self::GPBTYPE_ENUM, $mapDesc->getField(1)->getType());
239 $fieldDescMap = $this->buildFieldMap($desc);
244 $this->assertSame('my_oneof', $oneofDesc->getName());
246 $this->assertSame($fieldDesc, $fieldDescFromOneof);
247 $this->assertSame(1, $oneofDesc->getFieldCount());