Added the BC Layer alias for some phpunit methods to fix build at php <= 5.5.
This commit is contained in:
parent
d6f95508a9
commit
71766fed47
3 changed files with 39 additions and 3 deletions
|
|
@ -199,6 +199,31 @@ class TestSrcFilter extends AbstractComplexFilter
|
||||||
return $this->type;
|
return $this->type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get minimal version of ffmpeg starting with which this filter is supported.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getMinimalFFMpegVersion()
|
||||||
|
{
|
||||||
|
switch ($this->type) {
|
||||||
|
case self::PAL75BARS:
|
||||||
|
case self::PAL100BARS:
|
||||||
|
return '4.1';
|
||||||
|
case self::YUVTESTSRC:
|
||||||
|
return '3.2';
|
||||||
|
case self::ALLRGB:
|
||||||
|
case self::ALLYUV:
|
||||||
|
return '2.8';
|
||||||
|
case self::SMPTEHDBARS:
|
||||||
|
return '2.0';
|
||||||
|
case self::SMPTEBARS:
|
||||||
|
return '1.0';
|
||||||
|
default:
|
||||||
|
return '0.3';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@ use PHPUnit\Framework\TestCase;
|
||||||
* This is a BC Layer to support phpunit 4.8 needed for php <= 5.5.
|
* This is a BC Layer to support phpunit 4.8 needed for php <= 5.5.
|
||||||
*/
|
*/
|
||||||
if (class_exists('PHPUnit_Runner_Version')
|
if (class_exists('PHPUnit_Runner_Version')
|
||||||
&& version_compare(\PHPUnit_Runner_Version::id(), '5', '<')) {
|
&& version_compare(\PHPUnit_Runner_Version::id(), '5', '<')
|
||||||
|
) {
|
||||||
class BaseTestCase extends TestCase
|
class BaseTestCase extends TestCase
|
||||||
{
|
{
|
||||||
public static function assertScalar($value, $message = '')
|
public static function assertScalar($value, $message = '')
|
||||||
|
|
@ -40,6 +41,16 @@ if (class_exists('PHPUnit_Runner_Version')
|
||||||
{
|
{
|
||||||
$this->setExpectedException($exception, $message);
|
$this->setExpectedException($exception, $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function assertStringContainsString($needle, $haystack, $message = '')
|
||||||
|
{
|
||||||
|
self::assertContains($needle, $haystack, $message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function assertStringNotContainsString($needle, $haystack, $message = '')
|
||||||
|
{
|
||||||
|
self::assertNotContains($needle, $haystack, $message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
class BaseTestCase extends TestCase
|
class BaseTestCase extends TestCase
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue