Convert all array() syntax to []
[lhc/web/wiklou.git] / tests / phpunit / includes / site / DBSiteStoreTest.php
index 48ef524..4f4275d 100644 (file)
@@ -64,7 +64,7 @@ class DBSiteStoreTest extends MediaWikiTestCase {
        public function testSaveSites() {
                $store = new DBSiteStore();
 
-               $sites = array();
+               $sites = [];
 
                $site = new Site();
                $site->setGlobalId( 'ertrywuutr' );
@@ -140,18 +140,18 @@ class DBSiteStoreTest extends MediaWikiTestCase {
                $siteB->setGlobalId( 'B' );
                $siteA = new Site();
                $siteA->setGlobalId( 'A' );
-               $store->saveSites( array( $siteB, $siteA ) );
+               $store->saveSites( [ $siteB, $siteA ] );
 
                $sites = $store->getSites();
-               $siteIdentifiers = array();
+               $siteIdentifiers = [];
                /** @var Site $site */
                foreach ( $sites as $site ) {
                        $siteIdentifiers[] = $site->getGlobalId();
                }
-               $this->assertSame( array( 'A', 'B' ), $siteIdentifiers );
+               $this->assertSame( [ 'A', 'B' ], $siteIdentifiers );
 
                // Note: SiteList::getGlobalIdentifiers uses an other internal state. Iteration must be
                // tested separately.
-               $this->assertSame( array( 'A', 'B' ), $sites->getGlobalIdentifiers() );
+               $this->assertSame( [ 'A', 'B' ], $sites->getGlobalIdentifiers() );
        }
 }