ADD: added new version of protobuf
This commit is contained in:
@@ -5,7 +5,6 @@ require_once('test_util.php');
|
||||
|
||||
use Google\Protobuf\RepeatedField;
|
||||
use Google\Protobuf\GPBType;
|
||||
use Foo\EmptyAnySerialization;
|
||||
use Foo\TestInt32Value;
|
||||
use Foo\TestInt64Value;
|
||||
use Foo\TestUInt32Value;
|
||||
@@ -1514,22 +1513,4 @@ class EncodeDecodeTest extends TestBase
|
||||
[TestStringValue::class, "a", "\"a\"", "", "\"\""],
|
||||
];
|
||||
}
|
||||
|
||||
public function testEmptyAnySerialization()
|
||||
{
|
||||
$m = new EmptyAnySerialization();
|
||||
|
||||
$any = new Any();
|
||||
$any->pack($m);
|
||||
|
||||
$data = $any->serializeToJsonString();
|
||||
$this->assertEquals('{"@type":"type.googleapis.com/foo.EmptyAnySerialization"}', $data);
|
||||
|
||||
$any = new Any();
|
||||
$any->mergeFromJsonString($data);
|
||||
|
||||
$m = $any->unpack();
|
||||
$this->assertInstanceOf(EmptyAnySerialization::class, $m);
|
||||
$this->assertEquals('', $m->getA());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user