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