Fixed spacing in actions/cache/filebackend/filerepo/job folder
[mediawiki.git] / tests / phpunit / MediaWikiLangTestCase.php
blob0cf6e383e5c360aa103a194a02fba39b18053885
1 <?php
3 /**
4 * Base class that store and restore the Language objects
5 */
6 abstract class MediaWikiLangTestCase extends MediaWikiTestCase {
8 protected function setUp() {
9 global $wgLanguageCode, $wgContLang;
10 parent::setUp();
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,
23 'wgLang' => $langObj,
24 'wgContLang' => $langObj,
25 ) );
27 MessageCache::singleton()->disable();