Merge "Parse wikitext in gallery caption"
[lhc/web/wiklou.git] / tests / phpunit / includes / media / MediaWikiMediaTestCase.php
index 43eb299..7a536df 100644 (file)
@@ -19,7 +19,7 @@ abstract class MediaWikiMediaTestCase extends MediaWikiTestCase {
                if ( $this->createsThumbnails() ) {
                        // We need a temp directory for the thumbnails
                        // the container is named 'temp-thumb' because it is the
-                       // thumb directory for a FSRepo named "temp".
+                       // thumb directory for a repo named "temp".
                        $containers['temp-thumb'] = $this->getNewTempDirectory();
                }
 
@@ -33,7 +33,7 @@ abstract class MediaWikiMediaTestCase extends MediaWikiTestCase {
        }
 
        /**
-        * @return array Argument for FSRepo constructor
+        * @return array Argument for FileRepo constructor
         */
        protected function getRepoOptions() {
                return [
@@ -70,13 +70,13 @@ 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|null $type MIME type [optional]
         * @return UnregisteredLocalFile
         */
        protected function dataFile( $name, $type = null ) {
                if ( !$type ) {
                        // Autodetect by file extension for the lazy.
-                       $magic = MimeMagic::singleton();
+                       $magic = MediaWiki\MediaWikiServices::getInstance()->getMimeAnalyzer();
                        $parts = explode( $name, '.' );
                        $type = $magic->guessTypesForExtension( $parts[count( $parts ) - 1] );
                }