phase3/includes/upload/UploadBase.php:620
phase3/tests/phpunit/includes/UploadTest.php:120
phase3/tests/phpunit/includes/UploadTest.php:55
phase3/tests/phpunit/includes/UploadTest.php:35
$wgContLang not needed, TitlePermissionTest.php changes the language, inheriting from MediaWikiLangTestCase
MediaWikiPHPUnitCommand::$additionalOptions[$offset] = $value;
}
+
+ public static function disableInterwikis( $prefix, &$data ) {
+ return false;
+ }
}
/**
* @group Database
*/
-class TitlePermissionTest extends MediaWikiTestCase {
+class TitlePermissionTest extends MediaWikiLangTestCase {
protected $title;
protected $user;
protected $anonUser;
function setUp() {
global $wgLocaltimezone, $wgLocalTZoffset, $wgMemc, $wgContLang, $wgLang;
+ parent::setUp();
if(!$wgMemc) {
$wgMemc = new EmptyBagOStuff;
}
}
+ function tearDown() {
+ parent::tearDown();
+ }
+
function setUserPerm( $perm ) {
if ( is_array( $perm ) ) {
$this->user->mRights = $perm;
function setUp() {
- global $wgContLang;
+ global $wgHooks;
parent::setUp();
- $wgContLang = Language::factory( 'en' );
+
$this->upload = new UploadTestHandler;
+ $this->hooks = $wgHooks;
+ $wgHooks['InterwikiLoadPrefix'][] = 'MediaWikiTestCase::disableInterwikis';
+ }
+
+ function tearDown() {
+ $wgHooks = $this->hooks;
}
/**