Revert "Make LocalisationCache a service"
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiQuerySiteinfoTest.php
index d3a4ed4..282188d 100644 (file)
@@ -571,26 +571,26 @@ class ApiQuerySiteinfoTest extends ApiTestCase {
        }
 
        public function testExtensionTags() {
-               global $wgParser;
-
                $expected = array_map(
                        function ( $tag ) {
                                return "<$tag>";
                        },
-                       $wgParser->getTags()
+                       MediaWikiServices::getInstance()->getParser()->getTags()
                );
 
                $this->assertSame( $expected, $this->doQuery( 'extensiontags' ) );
        }
 
        public function testFunctionHooks() {
-               global $wgParser;
-
-               $this->assertSame( $wgParser->getFunctionHooks(), $this->doQuery( 'functionhooks' ) );
+               $this->assertSame( MediaWikiServices::getInstance()->getParser()->getFunctionHooks(),
+                       $this->doQuery( 'functionhooks' ) );
        }
 
        public function testVariables() {
-               $this->assertSame( MagicWord::getVariableIDs(), $this->doQuery( 'variables' ) );
+               $this->assertSame(
+                       MediaWikiServices::getInstance()->getMagicWordFactory()->getVariableIDs(),
+                       $this->doQuery( 'variables' )
+               );
        }
 
        public function testProtocols() {