Removed redundant set up in these classes (same as their paren class MediaWikiLangTestCase does already). * BlockTest * ExportTest * MWTimestampTest * TitlePermissionTest Change-Id: I28d18cb797bb249981727b02dffce4f0d8682b02
24 lines
633 B
PHP
24 lines
633 B
PHP
<?php
|
|
|
|
/**
|
|
* Base class that store and restore the Language objects
|
|
*/
|
|
abstract class MediaWikiLangTestCase extends MediaWikiTestCase {
|
|
protected function setUp() {
|
|
global $wgLanguageCode, $wgContLang;
|
|
|
|
if ( $wgLanguageCode != $wgContLang->getCode() ) {
|
|
throw new MWException( "Error in MediaWikiLangTestCase::setUp(): " .
|
|
"\$wgLanguageCode ('$wgLanguageCode') is different from " .
|
|
"\$wgContLang->getCode() (" . $wgContLang->getCode() . ")" );
|
|
}
|
|
|
|
parent::setUp();
|
|
|
|
$this->setUserLang( 'en' );
|
|
// For mainpage to be 'Main Page'
|
|
$this->setContentLang( 'en' );
|
|
|
|
MessageCache::singleton()->disable();
|
|
}
|
|
}
|