X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FWikiReferenceTest.php;h=724dd6056a154a5b7ea9cac55b458dd2517a940c;hb=a4eb5c9a8a3913b13ae2735d44aec5adb9d5731b;hp=bcef403aba5d5ac542ed4a8a3353136c3d64ee94;hpb=38ba6b620be9f6333d902055ae1c0c610af4985e;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/WikiReferenceTest.php b/tests/phpunit/includes/WikiReferenceTest.php index bcef403aba..724dd6056a 100644 --- a/tests/phpunit/includes/WikiReferenceTest.php +++ b/tests/phpunit/includes/WikiReferenceTest.php @@ -7,13 +7,13 @@ class WikiReferenceTest extends PHPUnit_Framework_TestCase { public function provideGetDisplayName() { - return array( - 'http' => array( 'foo.bar', 'http://foo.bar' ), - 'https' => array( 'foo.bar', 'http://foo.bar' ), + return [ + 'http' => [ 'foo.bar', 'http://foo.bar' ], + 'https' => [ 'foo.bar', 'http://foo.bar' ], // apparently, this is the expected behavior - 'invalid' => array( 'purple kittens', 'purple kittens' ), - ); + 'invalid' => [ 'purple kittens', 'purple kittens' ], + ]; } /** @@ -30,56 +30,56 @@ class WikiReferenceTest extends PHPUnit_Framework_TestCase { } public function provideGetCanonicalUrl() { - return array( - 'no fragment' => array( + return [ + 'no fragment' => [ 'https://acme.com/wiki/Foo', 'https://acme.com', '//acme.com', '/wiki/$1', 'Foo', null - ), - 'empty fragment' => array( + ], + 'empty fragment' => [ 'https://acme.com/wiki/Foo', 'https://acme.com', '//acme.com', '/wiki/$1', 'Foo', '' - ), - 'fragment' => array( + ], + 'fragment' => [ 'https://acme.com/wiki/Foo#Bar', 'https://acme.com', '//acme.com', '/wiki/$1', 'Foo', 'Bar' - ), - 'double fragment' => array( + ], + 'double fragment' => [ 'https://acme.com/wiki/Foo#Bar%23Xus', 'https://acme.com', '//acme.com', '/wiki/$1', 'Foo', 'Bar#Xus' - ), - 'escaped fragment' => array( + ], + 'escaped fragment' => [ 'https://acme.com/wiki/Foo%23Bar', 'https://acme.com', '//acme.com', '/wiki/$1', 'Foo#Bar', null - ), - 'empty path' => array( + ], + 'empty path' => [ 'https://acme.com/Foo', 'https://acme.com', '//acme.com', '/$1', 'Foo', null - ), - ); + ], + ]; } /** @@ -102,56 +102,56 @@ class WikiReferenceTest extends PHPUnit_Framework_TestCase { } public function provideGetFullUrl() { - return array( - 'no fragment' => array( + return [ + 'no fragment' => [ '//acme.com/wiki/Foo', 'https://acme.com', '//acme.com', '/wiki/$1', 'Foo', null - ), - 'empty fragment' => array( + ], + 'empty fragment' => [ '//acme.com/wiki/Foo', 'https://acme.com', '//acme.com', '/wiki/$1', 'Foo', '' - ), - 'fragment' => array( + ], + 'fragment' => [ '//acme.com/wiki/Foo#Bar', 'https://acme.com', '//acme.com', '/wiki/$1', 'Foo', 'Bar' - ), - 'double fragment' => array( + ], + 'double fragment' => [ '//acme.com/wiki/Foo#Bar%23Xus', 'https://acme.com', '//acme.com', '/wiki/$1', 'Foo', 'Bar#Xus' - ), - 'escaped fragment' => array( + ], + 'escaped fragment' => [ '//acme.com/wiki/Foo%23Bar', 'https://acme.com', '//acme.com', '/wiki/$1', 'Foo#Bar', null - ), - 'empty path' => array( + ], + 'empty path' => [ '//acme.com/Foo', 'https://acme.com', '//acme.com', '/$1', 'Foo', null - ), - ); + ], + ]; } /**