Deprecate Parser implementation methods (will be private in next release)
[lhc/web/wiklou.git] / tests / phpunit / includes / parser / MagicVariableTest.php
index 86b496e..cc474dd 100644 (file)
  * @file
  */
 
+use Wikimedia\TestingAccessWrapper;
+
 /**
  * @group Database
- * @covers Parser::getVariableValue
+ * @covers Parser::expandMagicVariable
  */
 class MagicVariableTest extends MediaWikiTestCase {
        /**
@@ -38,10 +40,7 @@ class MagicVariableTest extends MediaWikiTestCase {
                parent::setUp();
 
                $contLang = Language::factory( 'en' );
-               $this->setMwGlobals( [
-                       'wgLanguageCode' => 'en',
-                       'wgContLang' => $contLang,
-               ] );
+               $this->setContentLang( $contLang );
 
                $this->testParser = new Parser();
                $this->testParser->Options( ParserOptions::newFromUserAndLang( new User, $contLang ) );
@@ -225,7 +224,7 @@ class MagicVariableTest extends MediaWikiTestCase {
 
                $this->assertSame(
                        $expected,
-                       $this->testParser->getVariableValue( $magic ),
+                       TestingAccessWrapper::newFromObject( $this->testParser )->expandMagicVariable( $magic ),
                        $msg
                );
        }