public function testFirst() { $stream1 = $this->getStreamMock(); $stream2 = $this->getStreamMock(); $coll = new StreamCollection(array($stream1, $stream2)); $this->assertSame($stream1, $coll->first()); }
private function mapStreams($data) { $streams = new StreamCollection(); foreach ($data['streams'] as $properties) { $streams->add(new Stream($properties)); } return $streams; }