Merge remote-tracking branch 'upstream/master'

This commit is contained in:
CaliforniaMountainSnake 2020-02-26 09:43:23 +03:00
commit 580fb21d5a
45 changed files with 240 additions and 185 deletions

View file

@ -25,11 +25,10 @@ class FFProbeTest extends FunctionalTestCase
$this->assertFalse($ffprobe->isValid(__DIR__ . '/../files/WrongFile.mp4'));
}
/**
* @expectedException FFMpeg\Exception\RuntimeException
*/
public function testProbeOnNonExistantFile()
{
$this->expectException('\FFMpeg\Exception\RuntimeException');
$ffprobe = FFProbe::create();
$ffprobe->streams('/path/to/no/file');
}

View file

@ -3,9 +3,9 @@
namespace Tests\FFMpeg\Functional;
use FFMpeg\FFMpeg;
use PHPUnit\Framework\TestCase;
use Tests\FFMpeg\BaseTestCase;
abstract class FunctionalTestCase extends TestCase
abstract class FunctionalTestCase extends BaseTestCase
{
/**
* @return FFMpeg

View file

@ -71,10 +71,10 @@ class VideoTranscodeTest extends FunctionalTestCase
}
/**
* @expectedException \FFMpeg\Exception\RuntimeException
*/
public function testTranscodeInvalidFile()
{
$this->expectException('\FFMpeg\Exception\RuntimeException');
$ffmpeg = $this->getFFMpeg();
$ffmpeg->open(__DIR__ . '/../files/UnknownFileTest.ogv');
}
@ -84,7 +84,7 @@ class VideoTranscodeTest extends FunctionalTestCase
$ffmpeg = $this->getFFMpeg();
$video = new Video(__DIR__ . '/../files/UnknownFileTest.ogv', $ffmpeg->getFFMpegDriver(), $ffmpeg->getFFProbe());
$this->setExpectedException('FFMpeg\Exception\RuntimeException');
$this->expectException('\FFMpeg\Exception\RuntimeException');
$video->save(new X264('aac'), __DIR__ . '/output/output-x264.mp4');
}