X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fparser%2FParserOutputTest.php;h=ec8f0d076d92a85821d5c9e847cd84af4ff82a02;hb=46202ee2b218e7f2813ec97ece046b4850fd78a7;hp=e660e0964320ab1988fc6803a9b0ff7bba586ff6;hpb=2086cd118020f6388d7b6952ac2d9e2b55e6ef1f;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/parser/ParserOutputTest.php b/tests/phpunit/includes/parser/ParserOutputTest.php index e660e09643..ec8f0d076d 100644 --- a/tests/phpunit/includes/parser/ParserOutputTest.php +++ b/tests/phpunit/includes/parser/ParserOutputTest.php @@ -7,28 +7,28 @@ class ParserOutputTest extends MediaWikiTestCase { public static function provideIsLinkInternal() { - return array( + return [ // Different domains - array( false, 'http://example.org', 'http://mediawiki.org' ), + [ false, 'http://example.org', 'http://mediawiki.org' ], // Same domains - array( true, 'http://example.org', 'http://example.org' ), - array( true, 'https://example.org', 'https://example.org' ), - array( true, '//example.org', '//example.org' ), + [ true, 'http://example.org', 'http://example.org' ], + [ true, 'https://example.org', 'https://example.org' ], + [ true, '//example.org', '//example.org' ], // Same domain different cases - array( true, 'http://example.org', 'http://EXAMPLE.ORG' ), + [ true, 'http://example.org', 'http://EXAMPLE.ORG' ], // Paths, queries, and fragments are not relevant - array( true, 'http://example.org', 'http://example.org/wiki/Main_Page' ), - array( true, 'http://example.org', 'http://example.org?my=query' ), - array( true, 'http://example.org', 'http://example.org#its-a-fragment' ), + [ true, 'http://example.org', 'http://example.org/wiki/Main_Page' ], + [ true, 'http://example.org', 'http://example.org?my=query' ], + [ true, 'http://example.org', 'http://example.org#its-a-fragment' ], // Different protocols - array( false, 'http://example.org', 'https://example.org' ), - array( false, 'https://example.org', 'http://example.org' ), + [ false, 'http://example.org', 'https://example.org' ], + [ false, 'https://example.org', 'http://example.org' ], // Protocol relative servers always match http and https links - array( true, '//example.org', 'http://example.org' ), - array( true, '//example.org', 'https://example.org' ), + [ true, '//example.org', 'http://example.org' ], + [ true, '//example.org', 'https://example.org' ], // But they don't match strange things like this - array( false, '//example.org', 'irc://example.org' ), - ); + [ false, '//example.org', 'irc://example.org' ], + ]; } /**