X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22statistiques_visites%22%2C%22%22%29%20.%20%22?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fsite%2FDBSiteStoreTest.php;h=4f4275db324d88561a124188e911144be3c72c97;hb=6e9b4f0e9ce4ccd6089c18b205065ef7fa077484;hp=48ef5243b9ef06a5a894b78b52dbd99946bd1e21;hpb=2fd379fa95f223c6b3f3c8eff6de068eca9e1a1a;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/site/DBSiteStoreTest.php b/tests/phpunit/includes/site/DBSiteStoreTest.php index 48ef5243b9..4f4275db32 100644 --- a/tests/phpunit/includes/site/DBSiteStoreTest.php +++ b/tests/phpunit/includes/site/DBSiteStoreTest.php @@ -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() ); } }