<?php
+use MediaWiki\MediaWikiServices;
+
/**
* @group GlobalFunctions
* @covers ::wfThumbIsStandard
* @dataProvider provideThumbParams
*/
public function testIsStandard( $message, $expected, $params ) {
- $this->setService( 'MediaHandlerFactory', new MockMediaHandlerFactory() );
+ $handlers = MediaWikiServices::getInstance()->getMainConfig()->get( 'ParserTestMediaHandlers' );
+ $this->setService( 'MediaHandlerFactory', new MediaHandlerFactory( $handlers ) );
$this->assertSame(
$expected,
- wfThumbIsStandard( new FakeDimensionFile( [ 2000, 1800 ] ), $params ),
+ wfThumbIsStandard( new FakeDimensionFile( [ 2000, 1800 ], 'image/jpeg' ), $params ),
$message
);
}