// Query added
$this->assertEquals(
- '<a href="/w/index.php?title=Foobar&foo=bar" '. 'title="Foobar">Foobar</a>',
+ '<a href="/w/index.php?title=Foobar&foo=bar" ' . 'title="Foobar">Foobar</a>',
$linkRenderer->makeKnownLink( $target, null, [], [ 'foo' => 'bar' ] )
);
. '(page does not exist)"><script>evil()</script></a>',
$linkRenderer->makeLink( $foobar, new HtmlArmor( '<script>evil()</script>' ) )
);
+
+ $this->assertEquals(
+ '<a href="#fragment">fragment</a>',
+ $linkRenderer->makeLink( Title::newFromText( '#fragment' ) )
+ );
}
public function testGetLinkClasses() {