24 $this->titleFormatter = MediaWikiServices::getInstance()->getTitleFormatter();
25 $this->linkCache = MediaWikiServices::getInstance()->getLinkCache();
31 [
'forcearticlepath' ],
32 'getForceArticlePath',
46 [
'stubThreshold' => 150 ],
61 $this->assertInstanceOf( LinkRenderer::class,
$linkRenderer );
67 $this->assertInstanceOf( LinkRenderer::class, $factory->create() );
72 $user = $this->getMockBuilder( User::class )
73 ->setMethods( [
'getStubThreshold' ] )->getMock();
74 $user->expects( $this->once() )
75 ->method(
'getStubThreshold' )
79 $this->assertInstanceOf( LinkRenderer::class,
$linkRenderer );
Cache for article titles (prefixed DB keys) and ids linked from one source.
MediaWiki\Linker\LinkRendererFactory.
testCreateFromLegacyOptions( $options, $func, $val)
provideCreateFromLegacyOptions
TitleFormatter $titleFormatter
static provideCreateFromLegacyOptions()
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return true
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form before processing starts Return false to skip default processing and return $ret $linkRenderer