Add Png/Gif tests for extract image support

This commit is contained in:
Romain Neutron 2012-05-12 01:52:43 +02:00
commit d024622a8e

View file

@ -53,6 +53,37 @@ class FFMpegTest extends \PHPUnit_Framework_TestCase
unlink($dest);
}
/**
* @covers FFMpeg\FFMpeg::extractImage
*/
public function testExtractImagePng()
{
$dest = __DIR__ . '/../../files/extract_Test.png';
$this->object->open(__DIR__ . '/../../files/Test.ogv');
$this->object->extractImage(2, $dest);
$this->probe->probeFormat($dest);
unlink($dest);
}
/**
* @covers FFMpeg\FFMpeg::extractImage
*/
public function testExtractImageGif()
{
$dest = __DIR__ . '/../../files/extract_Test.gif';
$this->object->open(__DIR__ . '/../../files/Test.ogv');
$this->object->extractImage(2, $dest);
$this->probe->probeFormat($dest);
unlink($dest);
}
/**
* @covers FFMpeg\FFMpeg::extractImage
* @expectedException \FFMpeg\Exception\LogicException