Convert all array() syntax to []
[lhc/web/wiklou.git] / tests / phpunit / includes / specials / SpecialMyLanguageTest.php
index 4dbfc41..548b75b 100644 (file)
@@ -6,10 +6,10 @@
  */
 class SpecialMyLanguageTest extends MediaWikiTestCase {
        public function addDBData() {
-               $titles = array(
+               $titles = [
                        'Page/Another',
                        'Page/Another/ru',
-               );
+               ];
                foreach ( $titles as $title ) {
                        $page = WikiPage::factory( Title::newFromText( $title ) );
                        if ( $page->getId() == 0 ) {
@@ -36,9 +36,9 @@ class SpecialMyLanguageTest extends MediaWikiTestCase {
                $special = new SpecialMyLanguage();
                $special->getContext()->setLanguage( $userLang );
                // Test with subpages both enabled and disabled
-               $this->mergeMwGlobalArrayValue( 'wgNamespacesWithSubpages', array( NS_MAIN => true ) );
+               $this->mergeMwGlobalArrayValue( 'wgNamespacesWithSubpages', [ NS_MAIN => true ] );
                $this->assertTitle( $expected, $special->findTitle( $subpage ) );
-               $this->mergeMwGlobalArrayValue( 'wgNamespacesWithSubpages', array( NS_MAIN => false ) );
+               $this->mergeMwGlobalArrayValue( 'wgNamespacesWithSubpages', [ NS_MAIN => false ] );
                $this->assertTitle( $expected, $special->findTitle( $subpage ) );
        }
 
@@ -54,12 +54,12 @@ class SpecialMyLanguageTest extends MediaWikiTestCase {
        }
 
        public static function provideFindTitle() {
-               return array(
-                       array( null, '::Fail', 'en', 'en' ),
-                       array( 'Page/Another', 'Page/Another/en', 'en', 'en' ),
-                       array( 'Page/Another', 'Page/Another', 'en', 'en' ),
-                       array( 'Page/Another/ru', 'Page/Another', 'en', 'ru' ),
-                       array( 'Page/Another', 'Page/Another', 'en', 'es' ),
-               );
+               return [
+                       [ null, '::Fail', 'en', 'en' ],
+                       [ 'Page/Another', 'Page/Another/en', 'en', 'en' ],
+                       [ 'Page/Another', 'Page/Another', 'en', 'en' ],
+                       [ 'Page/Another/ru', 'Page/Another', 'en', 'ru' ],
+                       [ 'Page/Another', 'Page/Another', 'en', 'es' ],
+               ];
        }
 }