MediaWiki  1.33.0
MockImageHandler Class Reference

Mock handler for images. More...

Static Public Member Functions

static doFakeTransform ( $that, $image, $dstPath, $dstUrl, $params, $flags=0)
 Override BitmapHandler::doTransform() making sure we do not generate a thumbnail at all. More...
 

Detailed Description

Mock handler for images.

This is really intended for unit testing.

Definition at line 31 of file MockImageHandler.php.

Member Function Documentation

◆ doFakeTransform()

static MockImageHandler::doFakeTransform (   $that,
  $image,
  $dstPath,
  $dstUrl,
  $params,
  $flags = 0 
)
static

Override BitmapHandler::doTransform() making sure we do not generate a thumbnail at all.

That is merely returning a ThumbnailImage that will be consumed by the unit test. There is no need to create a real thumbnail on the filesystem.

Parameters
ImageHandler$that
File$image
string$dstPath
string$dstUrl
array$params
int$flags
Returns
ThumbnailImage

Definition at line 46 of file MockImageHandler.php.

References $image, $params, and wfDebug().

Referenced by MockBitmapHandler\doTransform(), and MockSvgHandler\doTransform().


The documentation for this class was generated from the following file: