IAlex has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/60392


Change subject: Fix TimestampTest broken by 7e3386d4
......................................................................

Fix TimestampTest broken by 7e3386d4

- 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
---
M tests/phpunit/includes/TimestampTest.php
1 file changed, 2 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/92/60392/1

diff --git a/tests/phpunit/includes/TimestampTest.php 
b/tests/phpunit/includes/TimestampTest.php
index 2d550bc..e1e196a 100644
--- a/tests/phpunit/includes/TimestampTest.php
+++ b/tests/phpunit/includes/TimestampTest.php
@@ -3,16 +3,12 @@
 /**
  * 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' 
) );
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/60392
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I910287ccf093ef5681cd09445501dccc8d3f4d14
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to