MediaWiki  1.29.2
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.

Since
1.28

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)
protected

Reimplemented from MediaHandlerFactory.

Definition at line 43 of file MockMediaHandlerFactory.php.

References $type, and class.

Member Data Documentation

◆ $overrides

MockMediaHandlerFactory::$overrides
staticprivate
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:
class
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