X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FLinkerTest.php;h=f4844f89bb4ec12f96bc89ffa7933f3e094ddef0;hb=4bd3e80e7ac013fc225f295a08c7709954889f6e;hp=3edf99f2e249ef4ac75eaf25cc2e4949d7619791;hpb=e758226c91935a1df2b6fd3ed1f18922d8bfb45b;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/LinkerTest.php b/tests/phpunit/includes/LinkerTest.php index 3edf99f2e2..f4844f89bb 100644 --- a/tests/phpunit/includes/LinkerTest.php +++ b/tests/phpunit/includes/LinkerTest.php @@ -265,7 +265,6 @@ class LinkerTest extends MediaWikiLangTestCase { * @dataProvider provideCasesForFormatLinksInComment */ public function testFormatLinksInComment( $expected, $input, $wiki ) { - $conf = new SiteConfiguration(); $conf->settings = [ 'wgServer' => [ @@ -307,6 +306,11 @@ class LinkerTest extends MediaWikiLangTestCase { 'foo bar [[Special:BlankPage]]', 'enwiki', ], + [ + 'foo bar Image:Example', + 'foo bar [[Image:Example]]', + 'enwiki', + ], ]; // @codingStandardsIgnoreEnd } @@ -385,21 +389,21 @@ class LinkerTest extends MediaWikiLangTestCase { return [ // Override $html [ - function( $dummy, $title, $options, &$html, &$attribs, &$ret ) { + function ( $dummy, $title, $options, &$html, &$attribs, &$ret ) { $html = 'foobar'; }, 'foobar' ], // Modify $attribs [ - function( $dummy, $title, $options, &$html, &$attribs, &$ret ) { + function ( $dummy, $title, $options, &$html, &$attribs, &$ret ) { $attribs['bar'] = 'baz'; }, 'Special:BlankPage' ], // Fully override return value and abort hook [ - function( $dummy, $title, $options, &$html, &$attribs, &$ret ) { + function ( $dummy, $title, $options, &$html, &$attribs, &$ret ) { $ret = 'blahblahblah'; return false; },