$this->setMwGlobals( 'wgExtraInterlanguageLinkPrefixes', [ 'madeuplanguage' ] );
$this->tablesUsed[] = 'interwiki';
+ $this->overrideMwServices();
}
/**
public function testSuppressed() {
$this->setGroupPermissions( 'sysop', 'viewsuppressed', true );
+ $this->overrideMwServices();
$res = $this->doApiRequest( [
'action' => 'parse',
* @param array $arr Extra params to add to API request
*/
private function doTestLangLinks( array $arr = [] ) {
- $this->setupInterwiki();
-
$res = $this->doApiRequest( array_merge( [
'action' => 'parse',
'title' => 'Omelette',
}
public function testLangLinks() {
+ $this->setupInterwiki();
$this->doTestLangLinks();
}
public function testLangLinksWithSkin() {
+ $this->setupInterwiki();
$this->setupSkin();
$this->doTestLangLinks( [ 'useskin' => 'testing' ] );
}
function ( $parser ) {
$output = $parser->getOutput();
$output->addModules( [ 'foo', 'bar' ] );
- $output->addModuleScripts( [ 'baz', 'quuz' ] );
$output->addModuleStyles( [ 'aaa', 'zzz' ] );
$output->addJsConfigVars( [ 'x' => 'y', 'z' => -3 ] );
}
] );
$this->assertSame( [ 'foo', 'bar' ], $res[0]['parse']['modules'] );
- $this->assertSame( [ 'baz', 'quuz' ], $res[0]['parse']['modulescripts'] );
+ $this->assertSame( [], $res[0]['parse']['modulescripts'] );
$this->assertSame( [ 'aaa', 'zzz' ], $res[0]['parse']['modulestyles'] );
$this->assertSame( [ 'x' => 'y', 'z' => -3 ], $res[0]['parse']['jsconfigvars'] );
$this->assertSame( '{"x":"y","z":-3}', $res[0]['parse']['encodedjsconfigvars'] );