Merge "Add Special:Users as a synonym for Special:ListUsers"
[lhc/web/wiklou.git] / tests / phpunit / includes / media / MediaWikiMediaTestCase.php
index a4e8056..2e9acfa 100644 (file)
@@ -70,16 +70,10 @@ abstract class MediaWikiMediaTestCase extends MediaWikiTestCase {
         *
         * File must be in the path returned by getFilePath()
         * @param string $name File name
-        * @param string $type MIME type [optional]
+        * @param string|false $type MIME type [optional]
         * @return UnregisteredLocalFile
         */
-       protected function dataFile( $name, $type = null ) {
-               if ( !$type ) {
-                       // Autodetect by file extension for the lazy.
-                       $magic = MediaWiki\MediaWikiServices::getInstance()->getMimeAnalyzer();
-                       $parts = explode( $name, '.' );
-                       $type = $magic->guessTypesForExtension( $parts[count( $parts ) - 1] );
-               }
+       protected function dataFile( $name, $type = false ) {
                return new UnregisteredLocalFile( false, $this->repo,
                        "mwstore://localtesting/data/$name", $type );
        }