'wgExtraInterlanguageLinkPrefixes' => [ 'self' ],
'wgExtraLanguageNames' => [ 'self' => 'Recursion' ],
] );
+ $this->resetServices();
MessageCache::singleton()->enable();
}
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() {