From d024622a8ea025c11f200f311025b53c39f83ac3 Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Sat, 12 May 2012 01:52:43 +0200 Subject: [PATCH] Add Png/Gif tests for extract image support --- tests/src/FFMpeg/FFMpegTest.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tests/src/FFMpeg/FFMpegTest.php b/tests/src/FFMpeg/FFMpegTest.php index edadbc9..00fa3c7 100644 --- a/tests/src/FFMpeg/FFMpegTest.php +++ b/tests/src/FFMpeg/FFMpegTest.php @@ -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