Merge "Localisation updates from https://translatewiki.net."
[lhc/web/wiklou.git] / tests / phpunit / includes / GlobalFunctions / wfAssembleUrlTest.php
index 13f49f7..7ddad36 100644 (file)
@@ -22,54 +22,54 @@ class WfAssembleUrlTest extends MediaWikiTestCase {
         * @return array
         */
        public static function provideURLParts() {
-               $schemes = array(
-                       '' => array(),
-                       '//' => array(
+               $schemes = [
+                       '' => [],
+                       '//' => [
                                'delimiter' => '//',
-                       ),
-                       'http://' => array(
+                       ],
+                       'http://' => [
                                'scheme' => 'http',
                                'delimiter' => '://',
-                       ),
-               );
+                       ],
+               ];
 
-               $hosts = array(
-                       '' => array(),
-                       'example.com' => array(
+               $hosts = [
+                       '' => [],
+                       'example.com' => [
                                'host' => 'example.com',
-                       ),
-                       'example.com:123' => array(
+                       ],
+                       'example.com:123' => [
                                'host' => 'example.com',
                                'port' => 123,
-                       ),
-                       'id@example.com' => array(
+                       ],
+                       'id@example.com' => [
                                'user' => 'id',
                                'host' => 'example.com',
-                       ),
-                       'id@example.com:123' => array(
+                       ],
+                       'id@example.com:123' => [
                                'user' => 'id',
                                'host' => 'example.com',
                                'port' => 123,
-                       ),
-                       'id:key@example.com' => array(
+                       ],
+                       'id:key@example.com' => [
                                'user' => 'id',
                                'pass' => 'key',
                                'host' => 'example.com',
-                       ),
-                       'id:key@example.com:123' => array(
+                       ],
+                       'id:key@example.com:123' => [
                                'user' => 'id',
                                'pass' => 'key',
                                'host' => 'example.com',
                                'port' => 123,
-                       ),
-               );
+                       ],
+               ];
 
-               $cases = array();
+               $cases = [];
                foreach ( $schemes as $scheme => $schemeParts ) {
                        foreach ( $hosts as $host => $hostParts ) {
-                               foreach ( array( '', '/path' ) as $path ) {
-                                       foreach ( array( '', 'query' ) as $query ) {
-                                               foreach ( array( '', 'fragment' ) as $fragment ) {
+                               foreach ( [ '', '/path' ] as $path ) {
+                                       foreach ( [ '', 'query' ] as $query ) {
+                                               foreach ( [ '', 'fragment' ] as $fragment ) {
                                                        $parts = array_merge(
                                                                $schemeParts,
                                                                $hostParts
@@ -90,10 +90,10 @@ class WfAssembleUrlTest extends MediaWikiTestCase {
                                                                $url .= '#' . $fragment;
                                                        }
 
-                                                       $cases[] = array(
+                                                       $cases[] = [
                                                                $parts,
                                                                $url,
-                                                       );
+                                                       ];
                                                }
                                        }
                                }
@@ -102,10 +102,10 @@ class WfAssembleUrlTest extends MediaWikiTestCase {
 
                $complexURL = 'http://id:key@example.org:321' .
                        '/over/there?name=ferret&foo=bar#nose';
-               $cases[] = array(
+               $cases[] = [
                        wfParseUrl( $complexURL ),
                        $complexURL,
-               );
+               ];
 
                return $cases;
        }