Add bc layer for older php and phpunit versions
This commit is contained in:
parent
8837f4b115
commit
7474bf936f
16 changed files with 90 additions and 99 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue