dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Fix error reporting in Special:Undelete"
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
LinkerTest.php
diff --git
a/tests/phpunit/includes/LinkerTest.php
b/tests/phpunit/includes/LinkerTest.php
index
3edf99f
..
f4844f8
100644
(file)
--- 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 ) {
* @dataProvider provideCasesForFormatLinksInComment
*/
public function testFormatLinksInComment( $expected, $input, $wiki ) {
-
$conf = new SiteConfiguration();
$conf->settings = [
'wgServer' => [
$conf = new SiteConfiguration();
$conf->settings = [
'wgServer' => [
@@
-307,6
+306,11
@@
class LinkerTest extends MediaWikiLangTestCase {
'foo bar [[Special:BlankPage]]',
'enwiki',
],
'foo bar [[Special:BlankPage]]',
'enwiki',
],
+ [
+ 'foo bar <a class="external" rel="nofollow" href="//en.example.org/w/File:Example">Image:Example</a>',
+ 'foo bar [[Image:Example]]',
+ 'enwiki',
+ ],
];
// @codingStandardsIgnoreEnd
}
];
// @codingStandardsIgnoreEnd
}
@@
-385,21
+389,21
@@
class LinkerTest extends MediaWikiLangTestCase {
return [
// Override $html
[
return [
// Override $html
[
- function( $dummy, $title, $options, &$html, &$attribs, &$ret ) {
+ function
( $dummy, $title, $options, &$html, &$attribs, &$ret ) {
$html = 'foobar';
},
'<a href="/wiki/Special:BlankPage" title="Special:BlankPage">foobar</a>'
],
// Modify $attribs
[
$html = 'foobar';
},
'<a href="/wiki/Special:BlankPage" title="Special:BlankPage">foobar</a>'
],
// Modify $attribs
[
- function( $dummy, $title, $options, &$html, &$attribs, &$ret ) {
+ function
( $dummy, $title, $options, &$html, &$attribs, &$ret ) {
$attribs['bar'] = 'baz';
},
'<a href="/wiki/Special:BlankPage" title="Special:BlankPage" bar="baz">Special:BlankPage</a>'
],
// Fully override return value and abort hook
[
$attribs['bar'] = 'baz';
},
'<a href="/wiki/Special:BlankPage" title="Special:BlankPage" bar="baz">Special:BlankPage</a>'
],
// 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;
},
$ret = 'blahblahblah';
return false;
},