ffmpeg-mappable-media/tests/Functional/FunctionalTestCase.php

30 lines
562 B
PHP
Raw Normal View History

2013-06-25 10:03:20 +02:00
<?php
namespace Tests\FFMpeg\Functional;
2013-06-25 10:03:20 +02:00
use FFMpeg\FFMpeg;
use PHPUnit\Framework\TestCase;
2013-06-25 10:03:20 +02:00
abstract class FunctionalTestCase extends TestCase
2013-06-25 10:03:20 +02:00
{
2013-12-02 12:47:27 +01:00
/**
* @return FFMpeg
*/
2013-06-25 10:03:20 +02:00
public function getFFMpeg()
{
return FFMpeg::create(array('timeout' => 300));
}
/**
* Get ffmpeg version.
*
* @return string
*/
public function getFFMpegVersion()
{
preg_match('#version\s(\S+)#',
$this->getFFMpeg()->getFFMpegDriver()->command('-version'), $version);
return $version[1];
}
2013-06-25 10:03:20 +02:00
}