public function testConvertToVideo() { $source = fopen("{$this->_files}/video_theora_comments.ogv", 'rb'); $target = fopen('php://temp', 'wb'); $subject = new Media_Process_Adapter_FfmpegShell($source); $subject->convert('video/mpeg'); $result = $subject->store($target); $this->assertType(PHPUnit_Framework_Constraint_IsType::TYPE_INT, $result); $this->assertEquals('video/mpeg', Mime_Type::guessType($target)); fclose($source); fclose($target); }
public function testPassthru() { $source = fopen("{$this->_files}/video_theora_comments.ogv", 'rb'); $target = fopen('php://temp', 'wb'); $subject = new Media_Process_Adapter_FfmpegShell($source); $subject->passthru('s', '50x100'); $subject->store($target); fclose($source); $subject = new Media_Process_Adapter_FfmpegShell($target); $this->assertEquals(50, $subject->width()); $this->assertEquals(100, $subject->height()); fclose($target); }