add() public method

Adds a \Protobuf\Stream to this collection
public add ( Stream $stream )
$stream Stream
 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());
 }