ProtobufTest\SerializeMessageTest::testReadRepeatedBytes PHP Method

testReadRepeatedBytes() public method

    public function testReadRepeatedBytes()
    {
        $binary = $this->getProtoContent('repeated-bytes.bin');
        $repeated = Repeated::fromStream($binary);
        $this->assertInstanceOf(Repeated::CLASS, $repeated);
        $this->assertInstanceOf(Collection::CLASS, $repeated->getBytesList());
        $this->assertCount(3, $repeated->getBytesList());
        $this->assertInstanceOf('Protobuf\\Stream', $repeated->getBytesList()[0]);
        $this->assertInstanceOf('Protobuf\\Stream', $repeated->getBytesList()[1]);
        $this->assertInstanceOf('Protobuf\\Stream', $repeated->getBytesList()[2]);
        $this->assertEquals('bin1', $repeated->getBytesList()[0]);
        $this->assertEquals('bin2', $repeated->getBytesList()[1]);
        $this->assertEquals('bin3', $repeated->getBytesList()[2]);
    }