Add bc layer for older php and phpunit versions

This commit is contained in:
Alexander Schranz 2020-02-19 21:52:13 +01:00
commit 7474bf936f
16 changed files with 90 additions and 99 deletions

View file

@ -42,12 +42,12 @@ class StreamTest extends TestCase
);
}
/**
* @expectedExceptionMessage Dimensions can only be retrieved from video streams.
*/
public function testGetDimensionsFromAudio()
{
$this->expectException('\FFMpeg\Exception\LogicException');
$this->expectException(
'\FFMpeg\Exception\LogicException',
'Dimensions can only be retrieved from video streams.'
);
$stream = new Stream(array('codec_type' => 'audio'));
$stream->getDimensions();
}
@ -60,11 +60,13 @@ class StreamTest extends TestCase
/**
* @dataProvider provideInvalidPropertiesForDimensionsExtraction
* @expectedExceptionMessage Unable to extract dimensions.
*/
public function testUnableToGetDimensionsFromVideo($properties)
{
$this->expectException('\FFMpeg\Exception\RuntimeException');
$this->expectException(
'\FFMpeg\Exception\RuntimeException',
'Unable to extract dimensions.'
);
$stream = new Stream(array('codec_type' => 'video', 'width' => 960));
$stream->getDimensions();
}