Provisional revert of r90538. I can't replicate the failures, but CI's been complaini...
authorChad Horohoe <demon@users.mediawiki.org>
Wed, 22 Jun 2011 00:01:15 +0000 (00:01 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Wed, 22 Jun 2011 00:01:15 +0000 (00:01 +0000)
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/includes/TitlePermissionTest.php
tests/phpunit/includes/UploadTest.php

index 64cb486..a88c357 100644 (file)
@@ -231,9 +231,5 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                MediaWikiPHPUnitCommand::$additionalOptions[$offset] = $value;
 
        }
-
-       public static function disableInterwikis( $prefix, &$data ) {
-               return false;
-       }
 }
 
index 753709c..2b920f5 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * @group Database
  */
-class TitlePermissionTest extends MediaWikiLangTestCase {
+class TitlePermissionTest extends MediaWikiTestCase {
        protected $title;
        protected $user;
        protected $anonUser;
@@ -14,7 +14,6 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
 
        function setUp() {
                global $wgLocaltimezone, $wgLocalTZoffset, $wgMemc, $wgContLang, $wgLang;
-               parent::setUp();
 
                if(!$wgMemc) {
                        $wgMemc = new EmptyBagOStuff;
@@ -51,10 +50,6 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
                }
        }
 
-       function tearDown() {
-               parent::tearDown();
-       }
-
        function setUserPerm( $perm ) {
                if ( is_array( $perm ) ) {
                        $this->user->mRights = $perm;
index c9d6afa..da19c90 100644 (file)
@@ -7,16 +7,10 @@ class UploadTest extends MediaWikiTestCase {
 
 
        function setUp() {
-               global $wgHooks;
+               global $wgContLang;
                parent::setUp();
-
+               $wgContLang = Language::factory( 'en' );
                $this->upload = new UploadTestHandler;
-               $this->hooks = $wgHooks;
-               $wgHooks['InterwikiLoadPrefix'][] = 'MediaWikiTestCase::disableInterwikis';
-       }
-
-       function tearDown() {
-               $wgHooks = $this->hooks;
        }
 
        /**