MediaWiki  1.28.0
MockMediaHandlerFactory Class Reference

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

Inheritance diagram for MockMediaHandlerFactory:
Collaboration diagram for MockMediaHandlerFactory:

Public Member Functions

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

Protected Member Functions

 getHandlerClass ($type)
 
- Protected Member Functions inherited from MediaHandlerFactory
 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

static MockMediaHandlerFactory::__construct ( )

Definition at line 39 of file MockMediaHandlerFactory.php.

Member Function Documentation

MockMediaHandlerFactory::getHandlerClass (   $type)
protected

Definition at line 43 of file MockMediaHandlerFactory.php.

References $type, and class.

Member Data Documentation

MockMediaHandlerFactory::$overrides
staticprivate
Initial value:
= [
'image/svg+xml' => MockSvgHandler::class

Definition at line 33 of file MockMediaHandlerFactory.php.


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