MediaWiki  1.29.1
MockMediaHandlerFactory Class Reference

Replace all media handlers with a mock. More...

Inheritance diagram for MockMediaHandlerFactory:
Collaboration diagram for MockMediaHandlerFactory:

Public Member Functions

 __construct ()
- Public Member Functions inherited from MediaHandlerFactory
 __construct (array $registry)
 getHandler ( $type)

Protected Member Functions

 getHandlerClass ( $type)

Static Private Attributes

static $overrides

Detailed Description

Replace all media handlers with a mock.

We do not need to generate actual thumbnails to do parser testing, we only care about receiving a ThumbnailImage properly initialized.


Definition at line 31 of file MockMediaHandlerFactory.php.

Constructor & Destructor Documentation

◆ __construct()

MockMediaHandlerFactory::__construct ( )

Definition at line 39 of file MockMediaHandlerFactory.php.

Member Function Documentation

◆ getHandlerClass()

MockMediaHandlerFactory::getHandlerClass (   $type)

Reimplemented from MediaHandlerFactory.

Definition at line 43 of file MockMediaHandlerFactory.php.

References $type, and class.

Member Data Documentation

◆ $overrides

Initial value:
= [
'image/svg+xml' => MockSvgHandler::class,
'image/vnd.djvu' => MockDjVuHandler::class,
'application/ogg' => MockOggHandler::class,

Definition at line 33 of file MockMediaHandlerFactory.php.

The documentation for this class was generated from the following file:
you have access to all of the normal MediaWiki so you can get a DB use the etc For full docs on the Maintenance class
Definition: maintenance.txt:52