Fix MediaWikiPageLinkRendererTest failing in non-English setups
authorThiemo Mättig <thiemo.maettig@wikimedia.de>
Wed, 9 Jul 2014 15:50:00 +0000 (17:50 +0200)
committerThiemo Mättig <thiemo.maettig@wikimedia.de>
Wed, 9 Jul 2014 15:50:00 +0000 (17:50 +0200)
An other test that just assumes the testing environment is an English
MediaWiki. A very easy and hopefully very obvious fix. This even
restores the original content language.

Change-Id: I1c303e0f42465a95540cc093a0ff4bfb0180c686

tests/phpunit/includes/title/MediaWikiPageLinkRendererTest.php

index 73d7ff9..358b0fe 100644 (file)
  */
 class MediaWikiPageLinkRendererTest extends MediaWikiTestCase {
 
+       protected function setUp() {
+               parent::setUp();
+
+               $this->setMwGlobals( array(
+                       'wgContLang' => Language::factory( 'en' ),
+               ) );
+       }
+
        /**
         * Returns a mock GenderCache that will return "female" always.
         *