-
-
Notifications
You must be signed in to change notification settings - Fork 120
/
Copy pathMediaTest.php
58 lines (48 loc) · 1.29 KB
/
MediaTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/**
* This file is part of the PHP-FFmpeg-video-streaming package.
*
* (c) Amin Yazdanpanah <contact@aminyazdanpanah.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Tests\FFMpegStreaming;
use Streaming\DASH;
use Streaming\HLS;
use Streaming\Media;
use FFMpeg\FFProbe\DataMapping\Stream;
class MediaTest extends TestCase
{
public function testMediaClass()
{
$media = $this->getVideo();
$this->assertInstanceOf(Media::class, $media);
}
public function testDASH()
{
$this->assertInstanceOf(DASH::class, $this->getDASH());
}
public function testHLS()
{
$this->assertInstanceOf(HLS::class, $this->getHLS());
}
public function testGetPath()
{
$media = $this->getVideo();
$get_path_info = pathinfo($media->getPathfile());
$this->assertIsArray($get_path_info);
$this->assertArrayHasKey('dirname', $get_path_info);
$this->assertArrayHasKey('filename', $get_path_info);
}
private function getDASH()
{
$media = $this->getVideo();
return $media->DASH();
}
private function getHLS()
{
$media = $this->getVideo();
return $media->HLS();
}
}