4 * Base class that store and restore the Language objects
6 abstract class MediaWikiLangTestCase
extends MediaWikiTestCase
{
8 protected function setUp() {
9 global $wgLanguageCode, $wgContLang;
12 if ( $wgLanguageCode != $wgContLang->getCode() ) {
13 throw new MWException( "Error in MediaWikiLangTestCase::setUp(): " .
14 "\$wgLanguageCode ('$wgLanguageCode') is different from " .
15 "\$wgContLang->getCode() (" . $wgContLang->getCode() . ")" );
18 $langCode = 'en'; # For mainpage to be 'Main Page'
19 $langObj = Language
::factory( $langCode );
21 $this->setMwGlobals( array(
22 'wgLanguageCode' => $langCode,
24 'wgContLang' => $langObj,
27 MessageCache
::singleton()->disable();