ProtobufTest\StreamCollectionTest::testAddStream PHP Method

testAddStream() public method

public testAddStream ( )
    public function testAddStream()
    {
        $this->assertCount(0, $this->collection);
        $stream1 = Stream::create();
        $stream2 = Stream::create();
        $this->collection[] = $stream1;
        $this->collection->add($stream2);
        $this->assertCount(2, $this->collection);
        $this->assertEquals([$stream1, $stream2], $this->collection->getArrayCopy());
    }