Add Binary tests

This commit is contained in:
Romain Neutron 2012-04-13 11:23:04 +02:00
commit 3890100388
3 changed files with 93 additions and 2 deletions

View file

@ -30,7 +30,7 @@ abstract class Binary implements AdapterInterface
{
if ('' === $binary = self::autodetect(static::getBinaryName()))
{
throw new \Exception('Binary not found');
throw new Exception\BinaryNotFoundException('Binary not found');
}
return new static($binary, $logger);
@ -43,7 +43,7 @@ abstract class Binary implements AdapterInterface
if ( ! $process->isSuccessful() && ! $bypass_errors)
{
throw new Exception\RuntimeException('Failed to execute ' . $command);
throw new \RuntimeException('Failed to execute ' . $command);
}
$result = $process->getOutput();

View file

@ -0,0 +1,8 @@
<?php
namespace FFMpeg\Exception;
class BinaryNotFoundException extends \Exception
{
}