- Call RequestContext::getMain()->setLanguage() since
MWTimestamp::getHumanTimestamp() will call getLanguage() to get the
Language object (and it not always English depending on the order the
tests are called)
- While I'm at it, use MediaWikiLangTestCase to avoid duplicating things
Change-Id: I910287ccf093ef5681cd09445501dccc8d3f4d14
/**
* Tests timestamp parsing and output.
*/
-class TimestampTest extends MediaWikiTestCase {
+class TimestampTest extends MediaWikiLangTestCase {
protected function setUp() {
parent::setUp();
- $this->setMwGlobals( array(
- 'wgLanguageCode' => 'en',
- 'wgContLang' => Language::factory( 'en' ),
- 'wgLang' => Language::factory( 'en' ),
- ) );
+ RequestContext::getMain()->setLanguage( Language::factory( 'en' ) );
}
/**