Add Formats tests
This commit is contained in:
parent
3890100388
commit
eec7e3f2dd
3 changed files with 132 additions and 0 deletions
41
tests/src/FFMpeg/Format/OggTest.php
Normal file
41
tests/src/FFMpeg/Format/OggTest.php
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
namespace FFMpeg\Format;
|
||||
|
||||
require_once dirname(__FILE__) . '/../../../../src/FFMpeg/Format/Ogg.php';
|
||||
|
||||
class OggTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @var Ogg
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
$this->object = new Ogg(320, 320);
|
||||
}
|
||||
|
||||
public function testConstruct()
|
||||
{
|
||||
$this->assertInstanceOf('\\FFMpeg\\Format\\DefaultFormat', $this->object);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FFMpeg\Format\Ogg::getAvailableAudioCodecs
|
||||
*/
|
||||
public function testGetAvailableAudioCodecs()
|
||||
{
|
||||
$this->object->setAudioCodec('libvorbis');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FFMpeg\Format\Ogg::getAvailableVideoCodecs
|
||||
*/
|
||||
public function testGetAvailableVideoCodecs()
|
||||
{
|
||||
$this->object->setVideoCodec('libtheora');
|
||||
}
|
||||
|
||||
}
|
||||
49
tests/src/FFMpeg/Format/WebMTest.php
Normal file
49
tests/src/FFMpeg/Format/WebMTest.php
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
|
||||
namespace FFMpeg\Format;
|
||||
|
||||
require_once dirname(__FILE__) . '/../../../../src/FFMpeg/Format/WebM.php';
|
||||
|
||||
class WebMTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @var WebM
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
$this->object = new WebM(320, 320);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FFMpeg\Format\WebM::getAvailableAudioCodecs
|
||||
*/
|
||||
public function testGetAvailableAudioCodecs()
|
||||
{
|
||||
$this->object->setAudioCodec('libvorbis');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FFMpeg\Format\WebM::getAvailableVideoCodecs
|
||||
*/
|
||||
public function testGetAvailableVideoCodecs()
|
||||
{
|
||||
$this->object->setVideoCodec('libvpx');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FFMpeg\Format\WebM::getExtraParams
|
||||
*/
|
||||
public function testGetExtraParams()
|
||||
{
|
||||
$this->assertTrue(is_scalar($this->object->getExtraParams()));
|
||||
}
|
||||
|
||||
public function testConstruct()
|
||||
{
|
||||
$this->assertInstanceOf('\\FFMpeg\\Format\\DefaultFormat', $this->object);
|
||||
}
|
||||
|
||||
}
|
||||
42
tests/src/FFMpeg/Format/X264Test.php
Normal file
42
tests/src/FFMpeg/Format/X264Test.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
namespace FFMpeg\Format;
|
||||
|
||||
require_once dirname(__FILE__) . '/../../../../src/FFMpeg/Format/X264.php';
|
||||
|
||||
class X264Test extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @var X264
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
$this->object = new X264(320, 320);
|
||||
}
|
||||
|
||||
public function testConstruct()
|
||||
{
|
||||
$this->assertInstanceOf('\\FFMpeg\\Format\\DefaultFormat', $this->object);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FFMpeg\Format\X264::getAvailableAudioCodecs
|
||||
*/
|
||||
public function testGetAvailableAudioCodecs()
|
||||
{
|
||||
$this->object->setAudioCodec('libmp3lame');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FFMpeg\Format\X264::getAvailableVideoCodecs
|
||||
*/
|
||||
public function testGetAvailableVideoCodecs()
|
||||
{
|
||||
$this->object->setVideoCodec('libx264');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue