Merge "Improve "selfmove" message's wording"
[lhc/web/wiklou.git] / tests / phpunit / maintenance / backup_PageTest.php
index 5781d1c..554d5f6 100644 (file)
@@ -22,13 +22,14 @@ class BackupDumperPageTest extends DumpTestCase {
 
        function addDBData() {
                // be sure, titles created here using english namespace names
-               $this->setMwGlobals( array(
+               $this->setMwGlobals( [
                        'wgLanguageCode' => 'en',
                        'wgContLang' => Language::factory( 'en' ),
-               ) );
+               ] );
 
                $this->tablesUsed[] = 'page';
                $this->tablesUsed[] = 'revision';
+               $this->tablesUsed[] = 'ip_changes';
                $this->tablesUsed[] = 'text';
 
                try {
@@ -91,8 +92,8 @@ class BackupDumperPageTest extends DumpTestCase {
                // class), we have to assert, that the page id are consecutively
                // increasing
                $this->assertEquals(
-                       array( $this->pageId2, $this->pageId3, $this->pageId4 ),
-                       array( $this->pageId1 + 1, $this->pageId2 + 1, $this->pageId3 + 1 ),
+                       [ $this->pageId2, $this->pageId3, $this->pageId4 ],
+                       [ $this->pageId1 + 1, $this->pageId2 + 1, $this->pageId3 + 1 ],
                        "Page ids increasing without holes" );
        }
 
@@ -101,10 +102,10 @@ class BackupDumperPageTest extends DumpTestCase {
                $fname = $this->getNewTempFile();
 
                $dumper = new DumpBackup();
-               $dumper->loadWithArgv( array( '--full', '--quiet', '--output', 'file:' . $fname ) );
+               $dumper->loadWithArgv( [ '--full', '--quiet', '--output', 'file:' . $fname ] );
                $dumper->startId = $this->pageId1;
                $dumper->endId = $this->pageId4 + 1;
-               $dumper->setDb( $this->db );
+               $dumper->setDB( $this->db );
 
                // Performing the dump
                $dumper->execute();
@@ -157,10 +158,10 @@ class BackupDumperPageTest extends DumpTestCase {
                $fname = $this->getNewTempFile();
 
                $dumper = new DumpBackup();
-               $dumper->loadWithArgv( array( '--full', '--quiet', '--output', 'file:' . $fname, '--stub' ) );
+               $dumper->loadWithArgv( [ '--full', '--quiet', '--output', 'file:' . $fname, '--stub' ] );
                $dumper->startId = $this->pageId1;
                $dumper->endId = $this->pageId4 + 1;
-               $dumper->setDb( $this->db );
+               $dumper->setDB( $this->db );
 
                // Performing the dump
                $dumper->execute();
@@ -206,11 +207,11 @@ class BackupDumperPageTest extends DumpTestCase {
                // Preparing the dump
                $fname = $this->getNewTempFile();
 
-               $dumper = new DumpBackup( array( '--output', 'file:' . $fname ) );
+               $dumper = new DumpBackup( [ '--output', 'file:' . $fname ] );
                $dumper->startId = $this->pageId1;
                $dumper->endId = $this->pageId4 + 1;
                $dumper->reporting = false;
-               $dumper->setDb( $this->db );
+               $dumper->setDB( $this->db );
 
                // Performing the dump
                $dumper->dump( WikiExporter::CURRENT, WikiExporter::STUB );
@@ -252,11 +253,11 @@ class BackupDumperPageTest extends DumpTestCase {
                // Preparing the dump
                $fname = $this->getNewTempFile();
 
-               $dumper = new DumpBackup( array( '--output', 'gzip:' . $fname ) );
+               $dumper = new DumpBackup( [ '--output', 'gzip:' . $fname ] );
                $dumper->startId = $this->pageId1;
                $dumper->endId = $this->pageId4 + 1;
                $dumper->reporting = false;
-               $dumper->setDb( $this->db );
+               $dumper->setDB( $this->db );
 
                // Performing the dump
                $dumper->dump( WikiExporter::CURRENT, WikiExporter::STUB );
@@ -311,14 +312,14 @@ class BackupDumperPageTest extends DumpTestCase {
                $fnameMetaCurrent = $this->getNewTempFile();
                $fnameArticles = $this->getNewTempFile();
 
-               $dumper = new DumpBackup( array( "--full", "--stub", "--output=gzip:" . $fnameMetaHistory,
+               $dumper = new DumpBackup( [ "--full", "--stub", "--output=gzip:" . $fnameMetaHistory,
                        "--output=gzip:" . $fnameMetaCurrent, "--filter=latest",
                        "--output=gzip:" . $fnameArticles, "--filter=latest",
                        "--filter=notalk", "--filter=namespace:!NS_USER",
-                       "--reporting=1000" ) );
+                       "--reporting=1000" ] );
                $dumper->startId = $this->pageId1;
                $dumper->endId = $this->pageId4 + 1;
-               $dumper->setDb( $this->db );
+               $dumper->setDB( $this->db );
 
                // xmldumps-backup uses reporting. We will not check the exact reported
                // message, as they are dependent on the processing power of the used