public function testVideos() { $audio = $this->getStreamMock(); $audio->expects($this->once())->method('isVideo')->will($this->returnValue(false)); $video = $this->getStreamMock(); $video->expects($this->once())->method('isVideo')->will($this->returnValue(true)); $collection = new StreamCollection(array($audio, $video)); $videos = $collection->videos(); $this->assertInstanceOf('FFMpeg\\FFProbe\\DataMapping\\StreamCollection', $videos); $this->assertCount(1, $videos); $this->assertEquals(array($video), $videos->all()); }