Lines Matching refs:this

44         $this->assertEquals(1, $m->getOptionalInt32());
52 $this->assertEquals(true, $m->getValue());
55 $this->assertEquals(false, $m->getValue());
62 $this->assertSame("true", $m->serializeToJsonString());
69 $this->assertEquals(1.5, $m->getValue());
76 $this->assertSame("1.5", $m->serializeToJsonString());
83 $this->assertEquals(1.5, $m->getValue());
90 $this->assertSame("1.5", $m->serializeToJsonString());
97 $this->assertEquals(1, $m->getValue());
104 $this->assertSame("1", $m->serializeToJsonString());
111 $this->assertSame(12345, $m->getRepeatedField()[0]->getValue());
118 $this->assertEquals(1, $m->getValue());
125 $this->assertSame("1", $m->serializeToJsonString());
132 $this->assertEquals(1, $m->getValue());
139 $this->assertEquals(1, $m->getValue());
146 $this->assertSame("\"1\"", $m->serializeToJsonString());
153 $this->assertEquals(1, $m->getValue());
160 $this->assertEquals(1, $m->getValue());
167 $this->assertSame("\"1\"", $m->serializeToJsonString());
174 $this->assertSame("a", $m->getValue());
181 $this->assertSame("\"a\"", $m->serializeToJsonString());
188 $this->assertSame("a", $m->getRepeatedField()[0]->getValue());
195 $this->assertSame("a", $m->getMapField()[1]->getValue());
202 $this->assertSame("a", $m->getValue());
209 $this->assertSame("\"YQ==\"", $m->serializeToJsonString());
223 $data = $this->generateRandomString(12007);
226 $this->assertSame(strlen($expected), strlen($m->serializeToJsonString()));
232 $this->expectEmptyFields($from);
233 $this->setFields($from);
234 $this->expectFields($from);
237 $this->assertSame(bin2hex(TestUtil::getGoldenTestMessage()),
245 $this->expectFields($to);
251 $this->expectEmptyFields($from);
252 $this->setFields($from);
253 $this->expectFields($from);
259 $this->expectFields($to);
265 $this->expectEmptyFields($from);
271 $this->expectEmptyFields($to);
282 $this->assertSame(1, $n->getOneofInt32());
288 $this->assertSame(2.0, $n->getOneofFloat());
294 $this->assertSame('abc', $n->getOneofString());
302 $this->assertSame(1, $n->getOneofMessage()->getA());
309 $this->assertSame("oneof_enum", $n->getMyOneof());
310 $this->assertSame(TestEnum::ZERO, $n->getOneofEnum());
316 $this->assertSame("oneof_string", $n->getMyOneof());
317 $this->assertSame("", $n->getOneofString());
324 $this->assertSame("oneof_message", $n->getMyOneof());
325 $this->assertFalse(is_null($n->getOneofMessage()));
332 $this->assertFalse($m->hasTrueOptionalInt32());
334 $this->assertSame("", $data);
337 $this->assertTrue($m->hasTrueOptionalInt32());
339 $this->assertNotSame("", $data);
343 $this->assertTrue($m2->hasTrueOptionalInt32());
344 $this->assertSame(0, $m2->getTrueOptionalInt32());
350 $this->assertFalse($m->hasTrueOptionalInt32());
352 $this->assertSame("{}", $data);
355 $this->assertTrue($m->hasTrueOptionalInt32());
357 $this->assertNotSame("{}", $data);
361 $this->assertTrue($m2->hasTrueOptionalInt32());
362 $this->assertSame(0, $m2->getTrueOptionalInt32());
373 $this->assertSame("oneof_enum", $n->getMyOneof());
374 $this->assertSame(TestEnum::ONE, $n->getOneofEnum());
380 $this->assertSame("oneof_string", $n->getMyOneof());
381 $this->assertSame("a", $n->getOneofString());
387 $this->assertSame("oneof_bytes", $n->getMyOneof());
388 $this->assertSame("bbbb", $n->getOneofBytes());
395 $this->assertSame("oneof_message", $n->getMyOneof());
396 $this->assertFalse(is_null($n->getOneofMessage()));
403 $this->assertSame(TestUtil::getGoldenTestPackedMessage(),
412 $this->assertTrue(true);
420 $this->assertTrue(true);
427 $this->assertSame(TestUtil::getGoldenTestUnpackedMessage(),
436 $this->assertTrue(true);
444 $this->assertTrue(true);
475 $this->assertSame($encoded, bin2hex($data));
478 $this->assertEquals($original, $msg->getOptionalInt64());
485 $this->setFields($m1);
486 $this->expectFields($m1);
489 $this->setFields2($m2);
493 $this->expectFieldsMerged($m1);
501 $this->assertTrue(true);
509 $this->assertSame("08ffffffffffffffffff01", bin2hex($data));
515 $this->assertEquals(0, $m->getOptionalInt32());
517 $this->assertEquals(-1, $m->getOptionalInt32());
520 $this->assertEquals(0, $m->getOptionalInt32());
522 $this->assertEquals(-1, $m->getOptionalInt32());
529 $this->assertSame("", $data);
738 $this->assertSame(bin2hex($from), bin2hex($to));
745 $this->assertSame(bin2hex($from), bin2hex($to));
752 $this->assertSame(bin2hex($from), bin2hex($to));
759 $this->assertSame(bin2hex($from), bin2hex($to));
767 $this->assertSame("", bin2hex($to));
775 $this->assertSame("8a0100", bin2hex($to));
783 $this->assertSame("fa0200", bin2hex($to));
791 $this->assertSame("ba050408011200", bin2hex($to));
799 $this->assertSame("9a0400", bin2hex($to));
808 $this->assertSame(1, $m->getOptionalInt32());
814 $this->assertSame(1, $m->getOptionalInt32());
820 $this->assertSame(1, $m->getOptionalInt32());
826 $this->assertSame(1, $m->getOptionalInt32());
832 $this->assertSame(1, $m->getOptionalInt32());
838 $this->assertSame(1, $m->getOptionalInt32());
844 $this->assertSame(1, $m->getOptionalInt32());
850 $this->assertSame(1, $m->getOptionalInt32());
856 $this->assertSame(1, $m->getOptionalInt32());
862 $this->assertSame(1, $m->getOptionalInt32());
868 $this->assertSame(1, $m->getOptionalInt32());
874 $this->assertSame(1, $m->getOptionalInt32());
880 $this->assertSame(1, $m->getOptionalInt32());
886 $this->assertSame(1, $m->getOptionalInt32());
892 $this->assertSame(1, $m->getOptionalInt32());
898 $this->assertSame(1, $m->getOptionalInt32());
904 $this->assertSame(1, $m->getOptionalInt32());
910 $this->assertSame(1, $m->getOptionalInt32());
916 $this->assertSame(1, $m->getOptionalInt32());
922 $this->assertSame(1, $m->getOptionalInt32());
927 $this->assertSame(0, $m->getOptionalEnum());
933 $this->setFields($from);
937 $this->expectFields($to);
944 $this->assertEquals(1234, $m->getSeconds());
945 $this->assertEquals(567800000, $m->getNanos());
953 $this->assertEquals("\"1234.999999999s\"", $m->serializeToJsonString());
960 $this->assertEquals(946684800, $m->getSeconds());
961 $this->assertEquals(123456789, $m->getNanos());
969 $this->assertEquals("\"2000-01-01T00:00:00.123456789Z\"",
977 $this->assertSame("a", $m->getStringValue());
981 $this->assertSame(1.5, $m->getNumberValue());
985 $this->assertSame(true, $m->getBoolValue());
989 $this->assertSame("null_value", $m->getKind());
993 $this->assertSame("list_value", $m->getKind());
997 $this->assertSame("struct_value", $m->getKind());
1004 $this->assertSame("\"a\"", $m->serializeToJsonString());
1008 $this->assertSame("1.5", $m->serializeToJsonString());
1012 $this->assertSame("true", $m->serializeToJsonString());
1016 $this->assertSame("null", $m->serializeToJsonString());
1023 $this->assertSame(1.0, $m->getValues()[0]->getNumberValue());
1033 $this->assertSame("[1.5]", $m->serializeToJsonString());
1040 $this->assertSame('{"test":[]}', $m->serializeToJsonString());
1047 $this->assertSame(1.0, $m->getFields()["a"]
1059 $this->assertSame("{\"a\":1.5}", $m->serializeToJsonString());
1066 $this->assertSame('{"test":{}}', $m->serializeToJsonString());
1078 $this->assertSame("type.googleapis.com/foo.TestMessage",
1080 $this->assertSame("0801", bin2hex($m1->getValue()));
1086 $this->assertSame("type.googleapis.com/foo.TestMessage",
1088 $this->assertSame("0801", bin2hex($m2->getValue()));
1095 $this->assertSame("type.googleapis.com/foo.TestMessage",
1097 $this->assertSame("08011002", bin2hex($m3->getValue()));
1109 $this->assertSame("type.googleapis.com/foo.TestMessage",
1111 $this->assertSame("0801", bin2hex($m1->getAny()->getValue()));
1117 $this->assertSame("type.googleapis.com/foo.TestMessage",
1119 $this->assertSame("0801", bin2hex($m2->getAny()->getValue()));
1126 $this->assertSame("type.googleapis.com/foo.TestMessage",
1128 $this->assertSame("08011002", bin2hex($m3->getAny()->getValue()));
1141 $this->assertSame("type.googleapis.com/google.protobuf.Int32Value",
1143 $this->assertSame("0801", bin2hex($m1->getAny()->getValue()));
1174 $this->assertTrue($expected1 === $result || $expected2 === $result);
1182 $this->assertSame(
1190 $this->assertSame(
1202 $this->assertSame(
1214 $this->assertSame(
1228 $this->assertSame($data1, $data2);
1232 $this->assertSame("foo.bar_baz", $m->getPaths()[0]);
1233 $this->assertSame("qux", $m->getPaths()[1]);
1240 $this->assertSame("\"foo.barBaz,qux\"", $m->serializeToJsonString());
1247 $this->assertEquals("", $m->serializeToString());
1254 $this->assertSame("{\"mapInt32Int32\":{\"0\":0}}",
1259 $this->assertSame("{\"mapStringString\":{\"\":\"\"}}",
1268 $this->assertSame("{\"mapStringString\":{\"1\":\"1\"}}", $data);
1278 $this->assertTrue(true);
1286 $this->assertTrue(true);
1294 $this->assertTrue(true);
1302 $this->assertTrue(true);
1320 $this->assertEquals($nonDefaultValue, $wrapper->getValue());
1326 $this->assertEquals($defaultValue, $wrapper->getValue());
1332 $this->assertSame(0, count($repeatedWrapper));
1338 $this->assertSame(1, count($repeatedWrapper));
1339 $this->assertEquals($defaultValue, $repeatedWrapper[0]->getValue());
1345 $this->assertSame(1, count($repeatedWrapper));
1346 $this->assertEquals($defaultValue, $repeatedWrapper[0]->getValue());
1352 $this->assertEquals($nonDefaultValue, $wrapper->getValue());
1353 $this->assertEquals("oneof_field", $m->getOneofFields());
1354 $this->assertEquals(0, $m->getInt32Field());
1360 $this->assertEquals($defaultValue, $wrapper->getValue());
1361 $this->assertEquals("oneof_field", $m->getOneofFields());
1362 $this->assertEquals(0, $m->getInt32Field());
1379 $this->assertEquals($nonDefaultValue, $m->getFieldUnwrapped());
1384 $this->assertEquals($defaultValue, $m->getFieldUnwrapped());
1389 $this->assertEquals($nonDefaultValue, $m->getOneofFieldUnwrapped());
1390 $this->assertEquals("oneof_field", $m->getOneofFields());
1391 $this->assertEquals(0, $m->getInt32Field());
1396 $this->assertEquals($defaultValue, $m->getOneofFieldUnwrapped());
1397 $this->assertEquals("oneof_field", $m->getOneofFields());
1398 $this->assertEquals(0, $m->getInt32Field());
1418 $this->assertEquals($nonDefaultValue, $to->getFieldUnwrapped());
1426 $this->assertEquals($defaultValue, $to->getFieldUnwrapped());
1434 $this->assertEquals($nonDefaultValue, $to->getOneofFieldUnwrapped());
1442 $this->assertEquals($defaultValue, $to->getOneofFieldUnwrapped());
1462 $this->assertEquals($nonDefaultValue, $to->getFieldUnwrapped());
1470 $this->assertEquals($defaultValue, $to->getFieldUnwrapped());
1478 $this->assertEquals($nonDefaultValue, $to->getOneofFieldUnwrapped());
1486 $this->assertEquals($defaultValue, $to->getOneofFieldUnwrapped());