X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FLinkerTest.php;h=f4844f89bb4ec12f96bc89ffa7933f3e094ddef0;hb=8956885666e4678a8ff76f7310396d2b2874a858;hp=3edf99f2e249ef4ac75eaf25cc2e4949d7619791;hpb=ad1979423e82481380ee313b7fc3d0cb2ee4bd85;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; },