X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FLinkerTest.php;h=e50b4f14901c21e51afa7bcd3711d09e3ceec848;hb=6fa889309d6dde3bcfd1c5f939e317abf0f3e790;hp=82482576ef3fd0561cab69b3ad19386cc2350f4f;hpb=96906168cac0e9a7748511b48c369cf22c8406d5;p=lhc%2Fweb%2Fwiklou.git
diff --git a/tests/phpunit/includes/LinkerTest.php b/tests/phpunit/includes/LinkerTest.php
index 82482576ef..e50b4f1490 100644
--- a/tests/phpunit/includes/LinkerTest.php
+++ b/tests/phpunit/includes/LinkerTest.php
@@ -132,129 +132,129 @@ class LinkerTest extends MediaWikiLangTestCase {
$wikiId = 'enwiki'; // $wgConf has a fake entry for this
// @codingStandardsIgnoreStart Generic.Files.LineLength
- return array(
+ return [
// Linker::formatComment
- array(
+ [
'a<script>b',
'a */"
- ),
- array(
+ ],
+ [
'ââ',
"/* autocomment */",
false, true
- ),
- array(
+ ],
+ [
'â',
"/* autocomment */",
null
- ),
- array(
+ ],
+ [
'ââ',
"/* autocomment */",
false, false
- ),
- array(
+ ],
+ [
'ââ',
"/* autocomment */",
false, false, $wikiId
- ),
+ ],
// Linker::formatLinksInComment
- array(
+ [
'abc link def',
"abc [[link]] def",
- ),
- array(
+ ],
+ [
'abc text def',
"abc [[link|text]] def",
- ),
- array(
+ ],
+ [
'abc Special:BlankPage def',
"abc [[Special:BlankPage|]] def",
- ),
- array(
+ ],
+ [
'abc Ä
Åż def',
"abc [[%C4%85%C5%9B%C5%BC]] def",
- ),
- array(
+ ],
+ [
'abc #section def',
"abc [[#section]] def",
- ),
- array(
+ ],
+ [
'abc /subpage def',
"abc [[/subpage]] def",
- ),
- array(
+ ],
+ [
'abc "evil!" def',
"abc [[\"evil!\"]] def",
- ),
- array(
+ ],
+ [
'abc [[<script>very evil</script>]] def',
"abc [[]] def",
- ),
- array(
+ ],
+ [
'abc [[|]] def',
"abc [[|]] def",
- ),
- array(
+ ],
+ [
'abc link def',
"abc [[link]] def",
false, false
- ),
- array(
+ ],
+ [
'abc link def',
"abc [[link]] def",
false, false, $wikiId
- )
- );
+ ],
+ ];
// @codingStandardsIgnoreEnd
}
@@ -290,23 +290,23 @@ class LinkerTest extends MediaWikiLangTestCase {
public static function provideCasesForFormatLinksInComment() {
// @codingStandardsIgnoreStart Generic.Files.LineLength
- return array(
- array(
+ return [
+ [
'foo bar Special:BlankPage',
'foo bar [[Special:BlankPage]]',
null,
- ),
- array(
+ ],
+ [
'Foo\'bar',
"[[Foo'bar]]",
'enwiki',
- ),
- array(
+ ],
+ [
'foo bar Special:BlankPage',
'foo bar [[Special:BlankPage]]',
'enwiki',
- ),
- );
+ ],
+ ];
// @codingStandardsIgnoreEnd
}
}