Index: trunk/phase3/tests/phpunit/MediaWikiTestCase.php |
— | — | @@ -231,5 +231,9 @@ |
232 | 232 | MediaWikiPHPUnitCommand::$additionalOptions[$offset] = $value; |
233 | 233 | |
234 | 234 | } |
| 235 | + |
| 236 | + public static function disableInterwikis( $prefix, &$data ) { |
| 237 | + return false; |
| 238 | + } |
235 | 239 | } |
236 | 240 | |
Index: trunk/phase3/tests/phpunit/includes/UploadTest.php |
— | — | @@ -7,12 +7,18 @@ |
8 | 8 | |
9 | 9 | |
10 | 10 | function setUp() { |
11 | | - global $wgContLang; |
| 11 | + global $wgHooks; |
12 | 12 | parent::setUp(); |
13 | | - $wgContLang = Language::factory( 'en' ); |
| 13 | + |
14 | 14 | $this->upload = new UploadTestHandler; |
| 15 | + $this->hooks = $wgHooks; |
| 16 | + $wgHooks['InterwikiLoadPrefix'][] = 'MediaWikiTestCase::disableInterwikis'; |
15 | 17 | } |
16 | 18 | |
| 19 | + function tearDown() { |
| 20 | + $wgHooks = $this->hooks; |
| 21 | + } |
| 22 | + |
17 | 23 | /** |
18 | 24 | * Test various forms of valid and invalid titles that can be supplied. |
19 | 25 | */ |
Index: trunk/phase3/tests/phpunit/includes/TitlePermissionTest.php |
— | — | @@ -3,7 +3,7 @@ |
4 | 4 | /** |
5 | 5 | * @group Database |
6 | 6 | */ |
7 | | -class TitlePermissionTest extends MediaWikiTestCase { |
| 7 | +class TitlePermissionTest extends MediaWikiLangTestCase { |
8 | 8 | protected $title; |
9 | 9 | protected $user; |
10 | 10 | protected $anonUser; |
— | — | @@ -14,6 +14,7 @@ |
15 | 15 | |
16 | 16 | function setUp() { |
17 | 17 | global $wgLocaltimezone, $wgLocalTZoffset, $wgMemc, $wgContLang, $wgLang; |
| 18 | + parent::setUp(); |
18 | 19 | |
19 | 20 | if(!$wgMemc) { |
20 | 21 | $wgMemc = new EmptyBagOStuff; |
— | — | @@ -50,6 +51,10 @@ |
51 | 52 | } |
52 | 53 | } |
53 | 54 | |
| 55 | + function tearDown() { |
| 56 | + parent::tearDown(); |
| 57 | + } |
| 58 | + |
54 | 59 | function setUserPerm( $perm ) { |
55 | 60 | if ( is_array( $perm ) ) { |
56 | 61 | $this->user->mRights = $perm; |