Merge "Change 'editfont' default preference to 'monospace'"
[lhc/web/wiklou.git] / tests / phpunit / includes / GlobalFunctions / wfThumbIsStandardTest.php
index 9d9815b..bdba6a3 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * @group GlobalFunctions
  * @covers ::wfThumbIsStandard
@@ -92,10 +94,11 @@ class WfThumbIsStandardTest extends MediaWikiTestCase {
         * @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
                );
        }