Cleanup RefreshLinksPartitionTest
authoraddshore <addshorewiki@gmail.com>
Sat, 25 Jan 2014 13:15:42 +0000 (14:15 +0100)
committeraddshore <addshorewiki@gmail.com>
Sat, 25 Jan 2014 13:15:42 +0000 (14:15 +0100)
Change-Id: I9c8e66b7370f8ea8d9b4f8843718b29e992b1180

includes/job/utils/BacklinkJobUtils.php
tests/phpunit/includes/jobqueue/RefreshLinksPartitionTest.php

index b0b6ccd..c8e5df6 100644 (file)
@@ -62,7 +62,7 @@ class BacklinkJobUtils {
         * @param int $bSize BacklinkCache partition size; usually $wgUpdateRowsPerJob
         * @param int $cSize Max titles per leaf job; Usually 1 or a modest value
         * @param array $opts Optional parameter map
-        * @return array List of Job objects
+        * @return Job[] List of Job objects
         */
        public static function partitionBacklinkJob( Job $job, $bSize, $cSize, $opts = array() ) {
                $class = get_class( $job );
index 531a954..3d2b5d8 100644 (file)
@@ -6,7 +6,7 @@
  * @group Database
  */
 class RefreshLinksPartitionTest extends MediaWikiTestCase {
-       function __construct( $name = null, array $data = array(), $dataName = '' ) {
+       public function __construct( $name = null, array $data = array(), $dataName = '' ) {
                parent::__construct( $name, $data, $dataName );
 
                $this->tablesUsed[] = 'page';
@@ -20,9 +20,6 @@ class RefreshLinksPartitionTest extends MediaWikiTestCase {
        public function testRefreshLinks( $ns, $dbKey, $pages ) {
                $title = Title::makeTitle( $ns, $dbKey );
 
-               $dbw = wfGetDB( DB_MASTER );
-
-               $rows = array();
                foreach ( $pages as $page ) {
                        list( $bns, $bdbkey ) = $page;
                        $bpage = WikiPage::factory( Title::makeTitle( $bns, $bdbkey ) );