From: umherirrender Date: Thu, 16 Oct 2014 17:44:39 +0000 (+0200) Subject: Use setMwGlobals in TitleTest::testGetPageViewLanguage X-Git-Tag: 1.31.0-rc.0~13507^2 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=0731f52e9e1ba8a9685ff484da939b21d61c8927;p=lhc%2Fweb%2Fwiklou.git Use setMwGlobals in TitleTest::testGetPageViewLanguage Change-Id: I42cb31bf7c1fa1b77f2e8465e7e1e316972fec09 --- diff --git a/tests/phpunit/includes/TitleTest.php b/tests/phpunit/includes/TitleTest.php index fb58381f69..a4bc427a41 100644 --- a/tests/phpunit/includes/TitleTest.php +++ b/tests/phpunit/includes/TitleTest.php @@ -428,14 +428,14 @@ class TitleTest extends MediaWikiTestCase { public function testGetPageViewLanguage( $expected, $titleText, $contLang, $lang, $variant, $msg = '' ) { - global $wgLanguageCode, $wgContLang, $wgLang, $wgDefaultLanguageVariant, $wgAllowUserJs; - // Setup environnement for this test - $wgLanguageCode = $contLang; - $wgContLang = Language::factory( $contLang ); - $wgLang = Language::factory( $lang ); - $wgDefaultLanguageVariant = $variant; - $wgAllowUserJs = true; + $this->setMwGlobals( array( + 'wgLanguageCode' => $contLang, + 'wgContLang' => Language::factory( $contLang ), + 'wgLang' => Language::factory( $lang ), + 'wgDefaultLanguageVariant' => $variant, + 'wgAllowUserJs' => true, + ) ); $title = Title::newFromText( $titleText ); $this->assertInstanceOf( 'Title', $title,