From eac06f65cec0aad465557d876eccab93d3f042fa Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sun, 10 Jul 2016 17:23:29 +0200 Subject: [PATCH] Use more short array syntax in comments (/tests/) Change-Id: I86c73cb9447ac562a73348b4030e24ebf49a90dc --- .../includes/GlobalFunctions/GlobalTest.php | 2 +- .../includes/GlobalFunctions/wfBCP47Test.php | 2 +- .../GlobalFunctions/wfUrlencodeTest.php | 10 +- tests/phpunit/includes/HttpTest.php | 92 +++++++++---------- tests/phpunit/includes/MWNamespaceTest.php | 4 +- tests/phpunit/includes/MWTimestampTest.php | 4 +- tests/phpunit/includes/SanitizerTest.php | 6 +- .../includes/content/CssContentTest.php | 14 +-- .../includes/filebackend/FileBackendTest.php | 2 +- .../installer/DatabaseUpdaterTest.php | 2 +- .../registration/CoreVersionCheckerTest.php | 2 +- .../includes/specials/SpecialSearchTest.php | 4 +- .../title/MediaWikiTitleCodecTest.php | 6 +- 13 files changed, 75 insertions(+), 75 deletions(-) diff --git a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php index 9f2fdfe51d..1d48d08b1d 100644 --- a/tests/phpunit/includes/GlobalFunctions/GlobalTest.php +++ b/tests/phpunit/includes/GlobalFunctions/GlobalTest.php @@ -413,8 +413,8 @@ class GlobalTest extends MediaWikiTestCase { ); } - /** array( shorthand, expected integer ) */ public static function provideShorthand() { + // Syntax: [ shorthand, expected integer ] return [ # Null, empty ... [ '', -1 ], diff --git a/tests/phpunit/includes/GlobalFunctions/wfBCP47Test.php b/tests/phpunit/includes/GlobalFunctions/wfBCP47Test.php index 082fe222c0..c76666d36d 100644 --- a/tests/phpunit/includes/GlobalFunctions/wfBCP47Test.php +++ b/tests/phpunit/includes/GlobalFunctions/wfBCP47Test.php @@ -97,7 +97,7 @@ class WfBCP47Test extends MediaWikiTestCase { * az-Arab-x-AZE-derbend * AZE being private, it should be lower case, hence the test above * should probably be: - * array( 'az-arab-x-aze-derbend', 'az-Arab-x-AZE-derbend' ), + * [ 'az-arab-x-aze-derbend', 'az-Arab-x-AZE-derbend' ], */ # Private use registry values: diff --git a/tests/phpunit/includes/GlobalFunctions/wfUrlencodeTest.php b/tests/phpunit/includes/GlobalFunctions/wfUrlencodeTest.php index 1f1c9beaf1..cbe2e2f533 100644 --- a/tests/phpunit/includes/GlobalFunctions/wfUrlencodeTest.php +++ b/tests/phpunit/includes/GlobalFunctions/wfUrlencodeTest.php @@ -80,12 +80,12 @@ class WfUrlencodeTest extends MediaWikiTestCase { /** * Format is either: - * array( 'input', 'expected' ); + * [ 'input', 'expected' ]; * Or: - * array( 'input', - * array( 'Apache', 'expected' ), - * array( 'Microsoft-IIS/7', 'expected' ), - * ), + * [ 'input', + * [ 'Apache', 'expected' ], + * [ 'Microsoft-IIS/7', 'expected' ], + * ], * If you want to add other HTTP server name, you will have to add a new * testing method much like the testEncodingUrlWith() method above. */ diff --git a/tests/phpunit/includes/HttpTest.php b/tests/phpunit/includes/HttpTest.php index 4c2e02be25..ae0b4bee8b 100644 --- a/tests/phpunit/includes/HttpTest.php +++ b/tests/phpunit/includes/HttpTest.php @@ -106,8 +106,8 @@ class HttpTest extends MediaWikiTestCase { # (\S+) - host part is made of anything not whitespaces // commented these out in order to remove @group Broken // @todo are these valid tests? if so, fix Http::isValidURI so it can handle them - // array( false, 'http://!"èèè¿¿¿~~\'', 'hostname is made of any non whitespace' ), - // array( false, 'http://exam:ple.org/', 'hostname can not use colons!' ), + // [ false, 'http://!"èèè¿¿¿~~\'', 'hostname is made of any non whitespace' ], + // [ false, 'http://exam:ple.org/', 'hostname can not use colons!' ], # (:[0-9]+)? - port number [ true, 'http://example.org:80/' ], @@ -212,11 +212,11 @@ class HttpTest extends MediaWikiTestCase { [ 'CURLAUTH_DIGEST' ], [ 'CURLAUTH_GSSNEGOTIATE' ], [ 'CURLAUTH_NTLM' ], - // array( 'CURLCLOSEPOLICY_CALLBACK' ), // removed in PHP 5.6.0 - // array( 'CURLCLOSEPOLICY_LEAST_RECENTLY_USED' ), // removed in PHP 5.6.0 - // array( 'CURLCLOSEPOLICY_LEAST_TRAFFIC' ), // removed in PHP 5.6.0 - // array( 'CURLCLOSEPOLICY_OLDEST' ), // removed in PHP 5.6.0 - // array( 'CURLCLOSEPOLICY_SLOWEST' ), // removed in PHP 5.6.0 + // [ 'CURLCLOSEPOLICY_CALLBACK' ], // removed in PHP 5.6.0 + // [ 'CURLCLOSEPOLICY_LEAST_RECENTLY_USED' ], // removed in PHP 5.6.0 + // [ 'CURLCLOSEPOLICY_LEAST_TRAFFIC' ], // removed in PHP 5.6.0 + // [ 'CURLCLOSEPOLICY_OLDEST' ], // removed in PHP 5.6.0 + // [ 'CURLCLOSEPOLICY_SLOWEST' ], // removed in PHP 5.6.0 [ 'CURLE_ABORTED_BY_CALLBACK' ], [ 'CURLE_BAD_CALLING_ORDER' ], [ 'CURLE_BAD_CONTENT_ENCODING' ], @@ -268,7 +268,7 @@ class HttpTest extends MediaWikiTestCase { [ 'CURLE_RECV_ERROR' ], [ 'CURLE_SEND_ERROR' ], [ 'CURLE_SHARE_IN_USE' ], - // array( 'CURLE_SSH' ), // not present in HHVM 3.3.0-dev + // [ 'CURLE_SSH' ], // not present in HHVM 3.3.0-dev [ 'CURLE_SSL_CACERT' ], [ 'CURLE_SSL_CERTPROBLEM' ], [ 'CURLE_SSL_CIPHER' ], @@ -286,14 +286,14 @@ class HttpTest extends MediaWikiTestCase { [ 'CURLFTPAUTH_DEFAULT' ], [ 'CURLFTPAUTH_SSL' ], [ 'CURLFTPAUTH_TLS' ], - // array( 'CURLFTPMETHOD_MULTICWD' ), // not present in HHVM 3.3.0-dev - // array( 'CURLFTPMETHOD_NOCWD' ), // not present in HHVM 3.3.0-dev - // array( 'CURLFTPMETHOD_SINGLECWD' ), // not present in HHVM 3.3.0-dev + // [ 'CURLFTPMETHOD_MULTICWD' ], // not present in HHVM 3.3.0-dev + // [ 'CURLFTPMETHOD_NOCWD' ], // not present in HHVM 3.3.0-dev + // [ 'CURLFTPMETHOD_SINGLECWD' ], // not present in HHVM 3.3.0-dev [ 'CURLFTPSSL_ALL' ], [ 'CURLFTPSSL_CONTROL' ], [ 'CURLFTPSSL_NONE' ], [ 'CURLFTPSSL_TRY' ], - // array( 'CURLINFO_CERTINFO' ), // not present in HHVM 3.3.0-dev + // [ 'CURLINFO_CERTINFO' ], // not present in HHVM 3.3.0-dev [ 'CURLINFO_CONNECT_TIME' ], [ 'CURLINFO_CONTENT_LENGTH_DOWNLOAD' ], [ 'CURLINFO_CONTENT_LENGTH_UPLOAD' ], @@ -308,7 +308,7 @@ class HttpTest extends MediaWikiTestCase { [ 'CURLINFO_PRIVATE' ], [ 'CURLINFO_REDIRECT_COUNT' ], [ 'CURLINFO_REDIRECT_TIME' ], - // array( 'CURLINFO_REDIRECT_URL' ), // not present in HHVM 3.3.0-dev + // [ 'CURLINFO_REDIRECT_URL' ], // not present in HHVM 3.3.0-dev [ 'CURLINFO_REQUEST_SIZE' ], [ 'CURLINFO_SIZE_DOWNLOAD' ], [ 'CURLINFO_SIZE_UPLOAD' ], @@ -329,8 +329,8 @@ class HttpTest extends MediaWikiTestCase { [ 'CURLOPT_BUFFERSIZE' ], [ 'CURLOPT_CAINFO' ], [ 'CURLOPT_CAPATH' ], - // array( 'CURLOPT_CERTINFO' ), // not present in HHVM 3.3.0-dev - // array( 'CURLOPT_CLOSEPOLICY' ), // removed in PHP 5.6.0 + // [ 'CURLOPT_CERTINFO' ], // not present in HHVM 3.3.0-dev + // [ 'CURLOPT_CLOSEPOLICY' ], // removed in PHP 5.6.0 [ 'CURLOPT_CONNECTTIMEOUT' ], [ 'CURLOPT_CONNECTTIMEOUT_MS' ], [ 'CURLOPT_COOKIE' ], @@ -354,8 +354,8 @@ class HttpTest extends MediaWikiTestCase { [ 'CURLOPT_FTPPORT' ], [ 'CURLOPT_FTPSSLAUTH' ], [ 'CURLOPT_FTP_CREATE_MISSING_DIRS' ], - // array( 'CURLOPT_FTP_FILEMETHOD' ), // not present in HHVM 3.3.0-dev - // array( 'CURLOPT_FTP_SKIP_PASV_IP' ), // not present in HHVM 3.3.0-dev + // [ 'CURLOPT_FTP_FILEMETHOD' ], // not present in HHVM 3.3.0-dev + // [ 'CURLOPT_FTP_SKIP_PASV_IP' ], // not present in HHVM 3.3.0-dev [ 'CURLOPT_FTP_SSL' ], [ 'CURLOPT_FTP_USE_EPRT' ], [ 'CURLOPT_FTP_USE_EPSV' ], @@ -371,14 +371,14 @@ class HttpTest extends MediaWikiTestCase { [ 'CURLOPT_INFILESIZE' ], [ 'CURLOPT_INTERFACE' ], [ 'CURLOPT_IPRESOLVE' ], - // array( 'CURLOPT_KEYPASSWD' ), // not present in HHVM 3.3.0-dev + // [ 'CURLOPT_KEYPASSWD' ], // not present in HHVM 3.3.0-dev [ 'CURLOPT_KRB4LEVEL' ], [ 'CURLOPT_LOW_SPEED_LIMIT' ], [ 'CURLOPT_LOW_SPEED_TIME' ], [ 'CURLOPT_MAXCONNECTS' ], [ 'CURLOPT_MAXREDIRS' ], - // array( 'CURLOPT_MAX_RECV_SPEED_LARGE' ), // not present in HHVM 3.3.0-dev - // array( 'CURLOPT_MAX_SEND_SPEED_LARGE' ), // not present in HHVM 3.3.0-dev + // [ 'CURLOPT_MAX_RECV_SPEED_LARGE' ], // not present in HHVM 3.3.0-dev + // [ 'CURLOPT_MAX_SEND_SPEED_LARGE' ], // not present in HHVM 3.3.0-dev [ 'CURLOPT_NETRC' ], [ 'CURLOPT_NOBODY' ], [ 'CURLOPT_NOPROGRESS' ], @@ -390,7 +390,7 @@ class HttpTest extends MediaWikiTestCase { [ 'CURLOPT_POSTREDIR' ], [ 'CURLOPT_PRIVATE' ], [ 'CURLOPT_PROGRESSFUNCTION' ], - // array( 'CURLOPT_PROTOCOLS' ), // not present in HHVM 3.3.0-dev + // [ 'CURLOPT_PROTOCOLS' ], // not present in HHVM 3.3.0-dev [ 'CURLOPT_PROXY' ], [ 'CURLOPT_PROXYAUTH' ], [ 'CURLOPT_PROXYPORT' ], @@ -402,14 +402,14 @@ class HttpTest extends MediaWikiTestCase { [ 'CURLOPT_RANGE' ], [ 'CURLOPT_READDATA' ], [ 'CURLOPT_READFUNCTION' ], - // array( 'CURLOPT_REDIR_PROTOCOLS' ), // not present in HHVM 3.3.0-dev + // [ 'CURLOPT_REDIR_PROTOCOLS' ], // not present in HHVM 3.3.0-dev [ 'CURLOPT_REFERER' ], [ 'CURLOPT_RESUME_FROM' ], [ 'CURLOPT_RETURNTRANSFER' ], - // array( 'CURLOPT_SSH_AUTH_TYPES' ), // not present in HHVM 3.3.0-dev - // array( 'CURLOPT_SSH_HOST_PUBLIC_KEY_MD5' ), // not present in HHVM 3.3.0-dev - // array( 'CURLOPT_SSH_PRIVATE_KEYFILE' ), // not present in HHVM 3.3.0-dev - // array( 'CURLOPT_SSH_PUBLIC_KEYFILE' ), // not present in HHVM 3.3.0-dev + // [ 'CURLOPT_SSH_AUTH_TYPES' ], // not present in HHVM 3.3.0-dev + // [ 'CURLOPT_SSH_HOST_PUBLIC_KEY_MD5' ], // not present in HHVM 3.3.0-dev + // [ 'CURLOPT_SSH_PRIVATE_KEYFILE' ], // not present in HHVM 3.3.0-dev + // [ 'CURLOPT_SSH_PUBLIC_KEYFILE' ], // not present in HHVM 3.3.0-dev [ 'CURLOPT_SSLCERT' ], [ 'CURLOPT_SSLCERTPASSWD' ], [ 'CURLOPT_SSLCERTTYPE' ], @@ -437,28 +437,28 @@ class HttpTest extends MediaWikiTestCase { [ 'CURLOPT_VERBOSE' ], [ 'CURLOPT_WRITEFUNCTION' ], [ 'CURLOPT_WRITEHEADER' ], - // array( 'CURLPROTO_ALL' ), // not present in HHVM 3.3.0-dev - // array( 'CURLPROTO_DICT' ), // not present in HHVM 3.3.0-dev - // array( 'CURLPROTO_FILE' ), // not present in HHVM 3.3.0-dev - // array( 'CURLPROTO_FTP' ), // not present in HHVM 3.3.0-dev - // array( 'CURLPROTO_FTPS' ), // not present in HHVM 3.3.0-dev - // array( 'CURLPROTO_HTTP' ), // not present in HHVM 3.3.0-dev - // array( 'CURLPROTO_HTTPS' ), // not present in HHVM 3.3.0-dev - // array( 'CURLPROTO_LDAP' ), // not present in HHVM 3.3.0-dev - // array( 'CURLPROTO_LDAPS' ), // not present in HHVM 3.3.0-dev - // array( 'CURLPROTO_SCP' ), // not present in HHVM 3.3.0-dev - // array( 'CURLPROTO_SFTP' ), // not present in HHVM 3.3.0-dev - // array( 'CURLPROTO_TELNET' ), // not present in HHVM 3.3.0-dev - // array( 'CURLPROTO_TFTP' ), // not present in HHVM 3.3.0-dev + // [ 'CURLPROTO_ALL' ], // not present in HHVM 3.3.0-dev + // [ 'CURLPROTO_DICT' ], // not present in HHVM 3.3.0-dev + // [ 'CURLPROTO_FILE' ], // not present in HHVM 3.3.0-dev + // [ 'CURLPROTO_FTP' ], // not present in HHVM 3.3.0-dev + // [ 'CURLPROTO_FTPS' ], // not present in HHVM 3.3.0-dev + // [ 'CURLPROTO_HTTP' ], // not present in HHVM 3.3.0-dev + // [ 'CURLPROTO_HTTPS' ], // not present in HHVM 3.3.0-dev + // [ 'CURLPROTO_LDAP' ], // not present in HHVM 3.3.0-dev + // [ 'CURLPROTO_LDAPS' ], // not present in HHVM 3.3.0-dev + // [ 'CURLPROTO_SCP' ], // not present in HHVM 3.3.0-dev + // [ 'CURLPROTO_SFTP' ], // not present in HHVM 3.3.0-dev + // [ 'CURLPROTO_TELNET' ], // not present in HHVM 3.3.0-dev + // [ 'CURLPROTO_TFTP' ], // not present in HHVM 3.3.0-dev [ 'CURLPROXY_HTTP' ], - // array( 'CURLPROXY_SOCKS4' ), // not present in HHVM 3.3.0-dev + // [ 'CURLPROXY_SOCKS4' ], // not present in HHVM 3.3.0-dev [ 'CURLPROXY_SOCKS5' ], - // array( 'CURLSSH_AUTH_DEFAULT' ), // not present in HHVM 3.3.0-dev - // array( 'CURLSSH_AUTH_HOST' ), // not present in HHVM 3.3.0-dev - // array( 'CURLSSH_AUTH_KEYBOARD' ), // not present in HHVM 3.3.0-dev - // array( 'CURLSSH_AUTH_NONE' ), // not present in HHVM 3.3.0-dev - // array( 'CURLSSH_AUTH_PASSWORD' ), // not present in HHVM 3.3.0-dev - // array( 'CURLSSH_AUTH_PUBLICKEY' ), // not present in HHVM 3.3.0-dev + // [ 'CURLSSH_AUTH_DEFAULT' ], // not present in HHVM 3.3.0-dev + // [ 'CURLSSH_AUTH_HOST' ], // not present in HHVM 3.3.0-dev + // [ 'CURLSSH_AUTH_KEYBOARD' ], // not present in HHVM 3.3.0-dev + // [ 'CURLSSH_AUTH_NONE' ], // not present in HHVM 3.3.0-dev + // [ 'CURLSSH_AUTH_PASSWORD' ], // not present in HHVM 3.3.0-dev + // [ 'CURLSSH_AUTH_PUBLICKEY' ], // not present in HHVM 3.3.0-dev [ 'CURLVERSION_NOW' ], [ 'CURL_HTTP_VERSION_1_0' ], [ 'CURL_HTTP_VERSION_1_1' ], diff --git a/tests/phpunit/includes/MWNamespaceTest.php b/tests/phpunit/includes/MWNamespaceTest.php index ca01aef682..24db44581e 100644 --- a/tests/phpunit/includes/MWNamespaceTest.php +++ b/tests/phpunit/includes/MWNamespaceTest.php @@ -387,7 +387,7 @@ class MWNamespaceTest extends MediaWikiTestCase { $wgContentNamespaces = 5; $this->assertEquals( [ NS_MAIN ], MWNamespace::getContentNamespaces() ); - # test $wgContentNamespaces === array() + # test $wgContentNamespaces === [] $wgContentNamespaces = []; $this->assertEquals( [ NS_MAIN ], MWNamespace::getContentNamespaces() ); @@ -474,7 +474,7 @@ class MWNamespaceTest extends MediaWikiTestCase { * global $wgCapitalLink setting to have extended coverage. * * MWNamespace::isCapitalized() rely on two global settings: - * $wgCapitalLinkOverrides = array(); by default + * $wgCapitalLinkOverrides = []; by default * $wgCapitalLinks = true; by default * This function test $wgCapitalLinks * diff --git a/tests/phpunit/includes/MWTimestampTest.php b/tests/phpunit/includes/MWTimestampTest.php index bca39824b7..70e4aeab4a 100644 --- a/tests/phpunit/includes/MWTimestampTest.php +++ b/tests/phpunit/includes/MWTimestampTest.php @@ -102,7 +102,7 @@ class MWTimestampTest extends MediaWikiLangTestCase { /** * Returns a list of valid timestamps in the format: - * array( type, timestamp_of_type, timestamp_in_MW ) + * [ type, timestamp_of_type, timestamp_in_MW ] */ public static function provideValidTimestamps() { return [ @@ -124,7 +124,7 @@ class MWTimestampTest extends MediaWikiLangTestCase { /** * Returns a list of out of range timestamps in the format: - * array( type, timestamp_of_type ) + * [ type, timestamp_of_type ] */ public static function provideOutOfRangeTimestamps() { return [ diff --git a/tests/phpunit/includes/SanitizerTest.php b/tests/phpunit/includes/SanitizerTest.php index 72d71667b2..26529e871c 100644 --- a/tests/phpunit/includes/SanitizerTest.php +++ b/tests/phpunit/includes/SanitizerTest.php @@ -248,7 +248,7 @@ class SanitizerTest extends MediaWikiTestCase { } public static function provideDeprecatedAttributes() { - /** array( , , [message] ) */ + /** [ , , [message] ] */ return [ [ 'clear="left"', 'br' ], [ 'clear="all"', 'br' ], @@ -276,7 +276,7 @@ class SanitizerTest extends MediaWikiTestCase { } public static function provideCssCommentsFixtures() { - /** array( , , [message] ) */ + /** [ , , [message] ] */ return [ // Valid comments spanning entire input [ '/**/', '/**/' ], @@ -353,7 +353,7 @@ class SanitizerTest extends MediaWikiTestCase { } public static function provideEscapeIdReferenceList() { - /** array( , , ) */ + /** [ , , ] */ return [ [ 'foo bar', 'foo', 'bar' ], [ '#1 #2', '#1', '#2' ], diff --git a/tests/phpunit/includes/content/CssContentTest.php b/tests/phpunit/includes/content/CssContentTest.php index a2aef35f5e..d2078d7a23 100644 --- a/tests/phpunit/includes/content/CssContentTest.php +++ b/tests/phpunit/includes/content/CssContentTest.php @@ -101,15 +101,15 @@ class CssContentTest extends JavaScriptContentTest { */ public static function provideGetRedirectTarget() { // @codingStandardsIgnoreStart Generic.Files.LineLength - return array( - array( 'MediaWiki:MonoBook.css', "/* #REDIRECT */@import url(//example.org/w/index.php?title=MediaWiki:MonoBook.css&action=raw&ctype=text/css);" ), - array( 'User:FooBar/common.css', "/* #REDIRECT */@import url(//example.org/w/index.php?title=User:FooBar/common.css&action=raw&ctype=text/css);" ), - array( 'Gadget:FooBaz.css', "/* #REDIRECT */@import url(//example.org/w/index.php?title=Gadget:FooBaz.css&action=raw&ctype=text/css);" ), + return [ + [ 'MediaWiki:MonoBook.css', "/* #REDIRECT */@import url(//example.org/w/index.php?title=MediaWiki:MonoBook.css&action=raw&ctype=text/css);" ], + [ 'User:FooBar/common.css', "/* #REDIRECT */@import url(//example.org/w/index.php?title=User:FooBar/common.css&action=raw&ctype=text/css);" ], + [ 'Gadget:FooBaz.css', "/* #REDIRECT */@import url(//example.org/w/index.php?title=Gadget:FooBaz.css&action=raw&ctype=text/css);" ], # No #REDIRECT comment - array( null, "@import url(//example.org/w/index.php?title=Gadget:FooBaz.css&action=raw&ctype=text/css);" ), + [ null, "@import url(//example.org/w/index.php?title=Gadget:FooBaz.css&action=raw&ctype=text/css);" ], # Wrong domain - array( null, "/* #REDIRECT */@import url(//example.com/w/index.php?title=Gadget:FooBaz.css&action=raw&ctype=text/css);" ), - ); + [ null, "/* #REDIRECT */@import url(//example.com/w/index.php?title=Gadget:FooBaz.css&action=raw&ctype=text/css);" ], + ]; // @codingStandardsIgnoreEnd } diff --git a/tests/phpunit/includes/filebackend/FileBackendTest.php b/tests/phpunit/includes/filebackend/FileBackendTest.php index 4aeddc6b6f..af5d3ac88f 100644 --- a/tests/phpunit/includes/filebackend/FileBackendTest.php +++ b/tests/phpunit/includes/filebackend/FileBackendTest.php @@ -1516,7 +1516,7 @@ class FileBackendTest extends MediaWikiTestCase { [ "$base/unittest-cont1/e/a/z/some_file1.txt", true ], [ "$base/unittest-cont2/a/z/some_file2.txt", true ], # Specific to FS backend with no basePath field set - # array( "$base/unittest-cont3/a/z/some_file3.txt", false ), + # [ "$base/unittest-cont3/a/z/some_file3.txt", false ], ]; } diff --git a/tests/phpunit/includes/installer/DatabaseUpdaterTest.php b/tests/phpunit/includes/installer/DatabaseUpdaterTest.php index 5e5e921ae6..09d31fcb32 100644 --- a/tests/phpunit/includes/installer/DatabaseUpdaterTest.php +++ b/tests/phpunit/includes/installer/DatabaseUpdaterTest.php @@ -124,7 +124,7 @@ class FakeDatabase extends DatabaseBase { * * Example: * $id = $dbw->nextSequenceValue( 'page_page_id_seq' ); - * $dbw->insert( 'page', array( 'page_id' => $id ) ); + * $dbw->insert( 'page', [ 'page_id' => $id ] ); * $id = $dbw->insertId(); * * @return int diff --git a/tests/phpunit/includes/registration/CoreVersionCheckerTest.php b/tests/phpunit/includes/registration/CoreVersionCheckerTest.php index 4aa4f41524..1dfcd82226 100644 --- a/tests/phpunit/includes/registration/CoreVersionCheckerTest.php +++ b/tests/phpunit/includes/registration/CoreVersionCheckerTest.php @@ -14,7 +14,7 @@ class CoreVersionCheckerTest extends PHPUnit_Framework_TestCase { public static function provideCheck() { return [ - // array( $wgVersion, constraint, expected ) + // [ $wgVersion, constraint, expected ] [ '1.25alpha', '>= 1.26', false ], [ '1.25.0', '>= 1.26', false ], [ '1.26alpha', '>= 1.26', true ], diff --git a/tests/phpunit/includes/specials/SpecialSearchTest.php b/tests/phpunit/includes/specials/SpecialSearchTest.php index 4ea9686680..3fa8a9f8ed 100644 --- a/tests/phpunit/includes/specials/SpecialSearchTest.php +++ b/tests/phpunit/includes/specials/SpecialSearchTest.php @@ -29,10 +29,10 @@ class SpecialSearchTest extends MediaWikiTestCase { $this->newUserWithSearchNS( $userOptions ) ); /* - $context->setRequest( new FauxRequest( array( + $context->setRequest( new FauxRequest( [ 'ns5'=>true, 'ns6'=>true, - ) )); + ] )); */ $context->setRequest( new FauxRequest( $requested ) ); $search = new SpecialSearch(); diff --git a/tests/phpunit/includes/title/MediaWikiTitleCodecTest.php b/tests/phpunit/includes/title/MediaWikiTitleCodecTest.php index 4d914e4680..e7ac940b92 100644 --- a/tests/phpunit/includes/title/MediaWikiTitleCodecTest.php +++ b/tests/phpunit/includes/title/MediaWikiTitleCodecTest.php @@ -355,9 +355,9 @@ class MediaWikiTitleCodecTest extends MediaWikiTestCase { // XML/HTML character entity references // Note: Commented out because they are not marked invalid by the PHP test as // Title::newFromText runs Sanitizer::decodeCharReferencesAndNormalize first. - // array( 'A é B' ), - // array( 'A é B' ), - // array( 'A é B' ), + // [ 'A é B' ], + // [ 'A é B' ], + // [ 'A é B' ], // Subject of NS_TALK does not roundtrip to NS_MAIN [ 'Talk:File:Example.svg' ], // Directory navigation -- 2.20.1