scratch – Blame information for rev
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
115 | office | 1 | <?php |
2 | |||
3 | namespace Tests\FFMpeg\Unit\Media; |
||
4 | |||
5 | abstract class AbstractStreamableTestCase extends AbstractMediaTestCase |
||
6 | { |
||
7 | public function testGetStreams() |
||
8 | { |
||
9 | $classname = $this->getClassName(); |
||
10 | $ffprobe = $this->getFFProbeMock(); |
||
11 | $format = $this->getFormatMock(); |
||
12 | |||
13 | $ffprobe->expects($this->once()) |
||
14 | ->method('format') |
||
15 | ->with(__FILE__) |
||
16 | ->will($this->returnValue($format)); |
||
17 | |||
18 | $media = new $classname(__FILE__, $this->getFFMpegDriverMock(), $ffprobe); |
||
19 | $this->assertSame($format, $media->getFormat()); |
||
20 | } |
||
21 | |||
22 | public function testGetFormat() |
||
23 | { |
||
24 | $classname = $this->getClassName(); |
||
25 | $ffprobe = $this->getFFProbeMock(); |
||
26 | $streams = $this->getStreamCollectionMock(); |
||
27 | |||
28 | $ffprobe->expects($this->once()) |
||
29 | ->method('streams') |
||
30 | ->with(__FILE__) |
||
31 | ->will($this->returnValue($streams)); |
||
32 | |||
33 | $media = new $classname(__FILE__, $this->getFFMpegDriverMock(), $ffprobe); |
||
34 | $this->assertSame($streams, $media->getStreams()); |
||
35 | } |
||
36 | |||
37 | abstract protected function getClassName(); |
||
38 | } |