aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/filebackend/SwiftFileBackendTest.php
diff options
context:
space:
mode:
authorKunal Mehta <legoktm@member.fsf.org>2016-02-17 01:09:32 -0800
committerKunal Mehta <legoktm@member.fsf.org>2016-02-17 01:33:00 -0800
commit6e9b4f0e9ce4ccd6089c18b205065ef7fa077484 (patch)
tree58645fbce5c12d01b0d0fa87e338d4745e08920d /tests/phpunit/includes/filebackend/SwiftFileBackendTest.php
parent2fd379fa95f223c6b3f3c8eff6de068eca9e1a1a (diff)
downloadmediawikicore-6e9b4f0e9ce4ccd6089c18b205065ef7fa077484.tar.gz
mediawikicore-6e9b4f0e9ce4ccd6089c18b205065ef7fa077484.zip
Convert all array() syntax to []
Per wikitech-l consensus: https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html Notes: * Disabled CallTimePassByReference due to false positives (T127163) Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
Diffstat (limited to 'tests/phpunit/includes/filebackend/SwiftFileBackendTest.php')
-rw-r--r--tests/phpunit/includes/filebackend/SwiftFileBackendTest.php78
1 files changed, 39 insertions, 39 deletions
diff --git a/tests/phpunit/includes/filebackend/SwiftFileBackendTest.php b/tests/phpunit/includes/filebackend/SwiftFileBackendTest.php
index 877cb6020b6b..4f47f32a3422 100644
--- a/tests/phpunit/includes/filebackend/SwiftFileBackendTest.php
+++ b/tests/phpunit/includes/filebackend/SwiftFileBackendTest.php
@@ -13,7 +13,7 @@ class SwiftFileBackendTest extends MediaWikiTestCase {
parent::setUp();
$this->backend = TestingAccessWrapper::newFromObject(
- new SwiftFileBackend( array(
+ new SwiftFileBackend( [
'name' => 'local-swift-testing',
'class' => 'SwiftFileBackend',
'wikiId' => 'unit-testing',
@@ -22,7 +22,7 @@ class SwiftFileBackendTest extends MediaWikiTestCase {
'swiftUser' => 'test:tester',
'swiftKey' => 'testing',
'swiftTempUrlKey' => 'b3968d0207b54ece87cccc06515a89d4' // unused
- ) )
+ ] )
);
}
@@ -32,62 +32,62 @@ class SwiftFileBackendTest extends MediaWikiTestCase {
* @covers SwiftFileBackend::getCustomHeaders
*/
public function testSanitzeHdrs( $raw, $sanitized ) {
- $hdrs = $this->backend->sanitizeHdrs( array( 'headers' => $raw ) );
+ $hdrs = $this->backend->sanitizeHdrs( [ 'headers' => $raw ] );
$this->assertEquals( $hdrs, $sanitized, 'sanitizeHdrs() has expected result' );
}
public static function provider_testSanitzeHdrs() {
- return array(
- array(
- array(
+ return [
+ [
+ [
'content-length' => 345,
'content-type' => 'image+bitmap/jpeg',
'content-disposition' => 'inline',
'content-duration' => 35.6363,
'content-Custom' => 'hello',
'x-content-custom' => 'hello'
- ),
- array(
+ ],
+ [
'content-disposition' => 'inline',
'content-duration' => 35.6363,
'content-custom' => 'hello',
'x-content-custom' => 'hello'
- )
- ),
- array(
- array(
+ ]
+ ],
+ [
+ [
'content-length' => 345,
'content-type' => 'image+bitmap/jpeg',
'content-Disposition' => 'inline; filename=xxx; ' . str_repeat( 'o', 1024 ),
'content-duration' => 35.6363,
'content-custom' => 'hello',
'x-content-custom' => 'hello'
- ),
- array(
+ ],
+ [
'content-disposition' => 'inline;filename=xxx',
'content-duration' => 35.6363,
'content-custom' => 'hello',
'x-content-custom' => 'hello'
- )
- ),
- array(
- array(
+ ]
+ ],
+ [
+ [
'content-length' => 345,
'content-type' => 'image+bitmap/jpeg',
'content-disposition' => 'filename=' . str_repeat( 'o', 1024 ) . ';inline',
'content-duration' => 35.6363,
'content-custom' => 'hello',
'x-content-custom' => 'hello'
- ),
- array(
+ ],
+ [
'content-disposition' => '',
'content-duration' => 35.6363,
'content-custom' => 'hello',
'x-content-custom' => 'hello'
- )
- )
- );
+ ]
+ ]
+ ];
}
/**
@@ -101,21 +101,21 @@ class SwiftFileBackendTest extends MediaWikiTestCase {
}
public static function provider_testGetMetadataHeaders() {
- return array(
- array(
- array(
+ return [
+ [
+ [
'content-length' => 345,
'content-custom' => 'hello',
'x-content-custom' => 'hello',
'x-object-meta-custom' => 5,
'x-object-meta-sha1Base36' => 'a3deadfg...',
- ),
- array(
+ ],
+ [
'x-object-meta-custom' => 5,
'x-object-meta-sha1base36' => 'a3deadfg...',
- )
- )
- );
+ ]
+ ]
+ ];
}
/**
@@ -129,20 +129,20 @@ class SwiftFileBackendTest extends MediaWikiTestCase {
}
public static function provider_testGetMetadata() {
- return array(
- array(
- array(
+ return [
+ [
+ [
'content-length' => 345,
'content-custom' => 'hello',
'x-content-custom' => 'hello',
'x-object-meta-custom' => 5,
'x-object-meta-sha1Base36' => 'a3deadfg...',
- ),
- array(
+ ],
+ [
'custom' => 5,
'sha1base36' => 'a3deadfg...',
- )
- )
- );
+ ]
+ ]
+ ];
}
}