Convert all array() syntax to []
[lhc/web/wiklou.git] / tests / phpunit / includes / upload / UploadStashTest.php
index d5d1188..e0b57a7 100644 (file)
@@ -20,23 +20,23 @@ class UploadStashTest extends MediaWikiTestCase {
                parent::setUp();
 
                // Setup a file for bug 29408
-               $this->bug29408File = __DIR__ . '/bug29408';
+               $this->bug29408File = wfTempDir() . '/bug29408';
                file_put_contents( $this->bug29408File, "\x00" );
 
-               self::$users = array(
+               self::$users = [
                        'sysop' => new TestUser(
                                'Uploadstashtestsysop',
                                'Upload Stash Test Sysop',
                                'upload_stash_test_sysop@example.com',
-                               array( 'sysop' )
+                               [ 'sysop' ]
                        ),
                        'uploader' => new TestUser(
                                'Uploadstashtestuser',
                                'Upload Stash Test User',
                                'upload_stash_test_user@example.com',
-                               array()
+                               []
                        )
-               );
+               ];
        }
 
        protected function tearDown() {
@@ -69,12 +69,12 @@ class UploadStashTest extends MediaWikiTestCase {
        }
 
        public static function provideInvalidRequests() {
-               return array(
+               return [
                        'Check failure on bad wpFileKey' =>
-                               array( new FauxRequest( array( 'wpFileKey' => 'foo' ) ) ),
+                               [ new FauxRequest( [ 'wpFileKey' => 'foo' ] ) ],
                        'Check failure on bad wpSessionKey' =>
-                               array( new FauxRequest( array( 'wpSessionKey' => 'foo' ) ) ),
-               );
+                               [ new FauxRequest( [ 'wpSessionKey' => 'foo' ] ) ],
+               ];
        }
 
        /**
@@ -85,17 +85,17 @@ class UploadStashTest extends MediaWikiTestCase {
        }
 
        public static function provideValidRequests() {
-               return array(
+               return [
                        'Check good wpFileKey' =>
-                               array( new FauxRequest( array( 'wpFileKey' => 'testkey-test.test' ) ) ),
+                               [ new FauxRequest( [ 'wpFileKey' => 'testkey-test.test' ] ) ],
                        'Check good wpSessionKey' =>
-                               array( new FauxRequest( array( 'wpFileKey' => 'testkey-test.test' ) ) ),
+                               [ new FauxRequest( [ 'wpFileKey' => 'testkey-test.test' ] ) ],
                        'Check key precedence' =>
-                               array( new FauxRequest( array(
+                               [ new FauxRequest( [
                                        'wpFileKey' => 'testkey-test.test',
                                        'wpSessionKey' => 'foo'
-                               ) ) ),
-               );
+                               ] ) ],
+               ];
        }
        /**
         * @dataProvider provideValidRequests