Exemplo n.º 1
0
 function testMultiCodecMessageWithRepeatedFields()
 {
     $jsonCodec = new Codec\Json();
     $repeated = Protobuf\Protobuf::decode(Repeated::class, $this->bin_repeated_nested);
     $json = $jsonCodec->encode($repeated);
     $repeated = $jsonCodec->decode(new Repeated(), $json);
     $bin = Protobuf\Protobuf::encode($repeated);
     $this->assertEquals($bin, $this->bin_repeated_nested);
 }