Merge "Move wfEscapeWikiText() to Parser::escapeWikitext()"
[lhc/web/wiklou.git] / tests / phpunit / includes / media / MediaWikiMediaTestCase.php
index cb10be3..e854ab5 100644 (file)
@@ -15,7 +15,7 @@ abstract class MediaWikiMediaTestCase extends MediaWikiTestCase {
                parent::setUp();
 
                $this->filePath = $this->getFilePath();
-               $containers = array( 'data' => $this->filePath );
+               $containers = [ 'data' => $this->filePath ];
                if ( $this->createsThumbnails() ) {
                        // We need a temp directory for the thumbnails
                        // the container is named 'temp-thumb' because it is the
@@ -23,11 +23,12 @@ abstract class MediaWikiMediaTestCase extends MediaWikiTestCase {
                        $containers['temp-thumb'] = $this->getNewTempDirectory();
                }
 
-               $this->backend = new FSFileBackend( array(
+               $this->backend = new FSFileBackend( [
                        'name' => 'localtesting',
-                       'wikiId' => wfWikiId(),
-                       'containerPaths' => $containers
-               ) );
+                       'wikiId' => wfWikiID(),
+                       'containerPaths' => $containers,
+                       'tmpDirectory' => $this->getNewTempDirectory()
+               ] );
                $this->repo = new FSRepo( $this->getRepoOptions() );
        }
 
@@ -35,11 +36,11 @@ abstract class MediaWikiMediaTestCase extends MediaWikiTestCase {
         * @return array Argument for FSRepo constructor
         */
        protected function getRepoOptions() {
-               return array(
+               return [
                        'name' => 'temp',
                        'url' => 'http://localhost/thumbtest',
                        'backend' => $this->backend
-               );
+               ];
        }
 
        /**