Merge "Add semantic tags to license info text"
[lhc/web/wiklou.git] / tests / phpunit / includes / site / SiteExporterTest.php
index 7be19ef..09cdea7 100644 (file)
@@ -31,6 +31,8 @@
  */
 class SiteExporterTest extends PHPUnit_Framework_TestCase {
 
+       use MediaWikiCoversValidator;
+
        public function testConstructor_InvalidArgument() {
                $this->setExpectedException( 'InvalidArgumentException' );
 
@@ -50,7 +52,7 @@ class SiteExporterTest extends PHPUnit_Framework_TestCase {
                $tmp = tmpfile();
                $exporter = new SiteExporter( $tmp );
 
-               $exporter->exportSites( array( $foo, $acme ) );
+               $exporter->exportSites( [ $foo, $acme ] );
 
                fseek( $tmp, 0 );
                $xml = fread( $tmp, 16 * 1024 );
@@ -75,7 +77,7 @@ class SiteExporterTest extends PHPUnit_Framework_TestCase {
        }
 
        private function newSiteStore( SiteList $sites ) {
-               $store = $this->getMock( 'SiteStore' );
+               $store = $this->getMockBuilder( 'SiteStore' )->getMock();
 
                $store->expects( $this->once() )
                        ->method( 'saveSites' )
@@ -112,15 +114,15 @@ class SiteExporterTest extends PHPUnit_Framework_TestCase {
                $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 ] ),
+                       ],
+               ];
        }
 
        /**