The name change happened some time ago, and I think its about time to start using the name name! (Done with a find and replace) My personal motivation for doing this is that I have started trying out vscode as an IDE for mediawiki development, and right now it doesn't appear to handle php aliases very well or at all. Change-Id: I412235d91ae26e4c1c6a62e0dbb7e7cf3c5ed4a6
28 lines
759 B
PHP
28 lines
759 B
PHP
<?php
|
|
|
|
use MediaWiki\MediaWikiServices;
|
|
|
|
/**
|
|
* Base class that store and restore the Language objects
|
|
*/
|
|
abstract class MediaWikiLangTestCase extends MediaWikiIntegrationTestCase {
|
|
protected function setUp() : void {
|
|
global $wgLanguageCode;
|
|
|
|
$services = MediaWikiServices::getInstance();
|
|
$contLang = $services->getContentLanguage();
|
|
if ( $wgLanguageCode != $contLang->getCode() ) {
|
|
throw new MWException( "Error in MediaWikiLangTestCase::setUp(): " .
|
|
"\$wgLanguageCode ('$wgLanguageCode') is different from content language code (" .
|
|
$contLang->getCode() . ")" );
|
|
}
|
|
|
|
parent::setUp();
|
|
|
|
$this->setUserLang( 'en' );
|
|
// For mainpage to be 'Main Page'
|
|
$this->setContentLang( 'en' );
|
|
|
|
$services->getMessageCache()->disable();
|
|
}
|
|
}
|