/** * @covers BitmapHandler::doTransform */ public function testTooBigMustRenderImage() { $file = new FakeDimensionFile(array(4000, 4000)); $file->mustRender = true; $handler = new BitmapHandler(); $params = array('width' => '5000'); // Still bigger than max size. $this->assertEquals('TransformTooBigImageAreaError', get_class($handler->doTransform($file, 'dummy path', '', $params))); }
/** * Get the thumbnail code for videos * @param File $image * @param String $dstPath * @param String $dstUrl * @param Array $params * @param int $flags * @return object ThumbnailVideo object or error object */ function doTransform($image, $dstPath, $dstUrl, $params, $flags = 0) { $oThumbnailImage = parent::doTransform($image, $dstPath, $dstUrl, $params, $flags); return new ThumbnailVideo($oThumbnailImage->file, $oThumbnailImage->url, $oThumbnailImage->width, $oThumbnailImage->height, $oThumbnailImage->path, $oThumbnailImage->page); }