$tmp = tmpfile();
$exporter = new SiteExporter( $tmp );
- $exporter->exportSites( array( $foo, $acme ) );
+ $exporter->exportSites( [ $foo, $acme ] );
fseek( $tmp, 0 );
$xml = fread( $tmp, 16 * 1024 );
}
private function newSiteStore( SiteList $sites ) {
- $store = $this->getMock( 'SiteStore' );
+ $store = $this->getMockBuilder( 'SiteStore' )->getMock();
$store->expects( $this->once() )
->method( 'saveSites' )
$dewiki->setPath( MediaWikiSite::PATH_PAGE, 'http://de.wikipedia.org/wiki/' );
$dewiki->setSource( 'meta.wikimedia.org' );
- return array(
- 'empty' => array(
+ return [
+ 'empty' => [
new SiteList()
- ),
+ ],
- 'some' => array(
- new SiteList( array( $foo, $acme, $dewiki ) ),
- ),
- );
+ 'some' => [
+ new SiteList( [ $foo, $acme, $dewiki ] ),
+ ],
+ ];
}
/**