blob: fd308b2d9584697045edbf1ae2a46dec617b69c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<?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();
}
}
|