@@ -20,12 +20,7 @@ public static function setUpBeforeClass(): void
2020 {
2121 $ path = dirname (__FILE__ ).DIRECTORY_SEPARATOR .'.. ' .DIRECTORY_SEPARATOR .'data ' .DIRECTORY_SEPARATOR ;
2222 self ::$ moviePath = realpath ($ path .'test.mp4 ' );
23- self ::$ movieUrl = array (
24- 'base ' => 'https://github.com/char0n/ffmpeg-php/blob/master/tests/data/ ' ,
25- 'fileName ' => 'test ' ,
26- 'fileExtension ' => '.mp4 ' ,
27- 'query ' => '?raw=true '
28- );
23+ self ::$ movieUrl = 'https://github.com/char0n/ffmpeg-php/blob/master/tests/data/test.mp4?raw=true ' ;
2924 }
3025
3126 public static function tearDownAfterClass (): void
@@ -60,29 +55,22 @@ public function testGetOutputFileDoesNotExist()
6055 $ provider ->getOutput ();
6156 }
6257
63- public function testGetOutputUrl ()
58+ public function testGetOutputFromRemoteUrl ()
6459 {
6560 $ provider = new FFProbeProvider ();
66- $ provider ->setMovieFile (implode ( self ::$ movieUrl) );
61+ $ provider ->setMovieFile (self ::$ movieUrl );
6762 $ output = $ provider ->getOutput ();
6863
6964 $ this ->assertEquals (1 , preg_match ('/FFprobe version/i ' , $ output ));
7065 }
7166
72- public function testGetOutputUrlFileDoesNotExist ()
67+ public function testGetOutputFromRemoteUrlDoesNotExist ()
7368 {
7469 $ this ->expectException (\UnexpectedValueException::class);
7570 $ this ->expectExceptionCode (334561 );
7671
7772 $ provider = new FFProbeProvider ();
78- $ nonExistingUrlFile = sprintf (
79- '%s%s%s%s ' ,
80- self ::$ movieUrl ['base ' ],
81- uniqid ('test ' , true ),
82- self ::$ movieUrl ['fileExtension ' ],
83- self ::$ movieUrl ['query ' ]
84- );
85- $ provider ->setMovieFile ($ nonExistingUrlFile );
73+ $ provider ->setMovieFile ('https://github.com/char0n/test.mp4 ' );
8674 $ provider ->getOutput ();
8775 }
8876
0 commit comments