ffmpeg-mappable-media/tests/src/FFMpeg/BinaryTest.php

60 lines
989 B
PHP
Raw Normal View History

2012-04-13 11:23:04 +02:00
<?php
namespace FFMpeg;
class BinaryTest extends \PHPUnit_Framework_TestCase
{
/**
* @var Binary
*/
protected $object;
/**
* @covers FFMpeg\Binary::__construct
*/
public function testConstruct()
{
$binary = new BinaryTester('pretty_binary');
$binary = new BinaryTester('pretty_binary', new \Monolog\Logger('test'));
}
/**
* @covers FFMpeg\Binary::load
*/
public function testLoad()
{
BinaryTester::load();
}
/**
* @covers FFMpeg\Binary::load
* @expectedException \FFMpeg\Exception\BinaryNotFoundException
*/
public function testLoadWrongBinary()
{
BinaryTesterWrongBinary::load();
}
}
class BinaryTester extends Binary
{
protected static function getBinaryName()
{
2012-05-11 00:34:19 +02:00
return array('php');
2012-04-13 11:23:04 +02:00
}
}
class BinaryTesterWrongBinary extends Binary
{
protected static function getBinaryName()
{
2012-05-11 00:34:19 +02:00
return array('');
2012-04-13 11:23:04 +02:00
}
}