Merge "Added release notes for 'ContentHandler::runLegacyHooks' removal"
[mediawiki.git] / tests / phpunit / MediaWikiLangTestCase.php
blobfd308b2d9584697045edbf1ae2a46dec617b69c6
1 <?php
3 /**
4 * Base class that store and restore the Language objects
5 */
6 abstract class MediaWikiLangTestCase extends MediaWikiTestCase {
7 protected function setUp() {
8 global $wgLanguageCode, $wgContLang;
10 if ( $wgLanguageCode != $wgContLang->getCode() ) {
11 throw new MWException( "Error in MediaWikiLangTestCase::setUp(): " .
12 "\$wgLanguageCode ('$wgLanguageCode') is different from " .
13 "\$wgContLang->getCode() (" . $wgContLang->getCode() . ")" );
16 parent::setUp();
18 $this->setUserLang( 'en' );
19 // For mainpage to be 'Main Page'
20 $this->setContentLang( 'en' );
22 MessageCache::singleton()->disable();