Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-26 11:30:18 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-26 18:34:56 +0300
commitb80ebc96748b45fd2e0ba9323308657c4b00b7ec (patch)
treeec20e0ffa2f86b9b54939a83a785407319f94559 /tests/lib/UtilTest.php
parent62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff)
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/UtilTest.php')
-rw-r--r--tests/lib/UtilTest.php52
1 files changed, 26 insertions, 26 deletions
diff --git a/tests/lib/UtilTest.php b/tests/lib/UtilTest.php
index 94ac17ce345..4d8432294fb 100644
--- a/tests/lib/UtilTest.php
+++ b/tests/lib/UtilTest.php
@@ -206,16 +206,16 @@ class UtilTest extends \Test\TestCase {
}
public function dataProviderForTestIsSharingDisabledForUser() {
- return array(
+ return [
// existing groups, groups the user belong to, groups excluded from sharing, expected result
- array(array('g1', 'g2', 'g3'), array(), array('g1'), false),
- array(array('g1', 'g2', 'g3'), array(), array(), false),
- array(array('g1', 'g2', 'g3'), array('g2'), array('g1'), false),
- array(array('g1', 'g2', 'g3'), array('g2'), array(), false),
- array(array('g1', 'g2', 'g3'), array('g1', 'g2'), array('g1'), false),
- array(array('g1', 'g2', 'g3'), array('g1', 'g2'), array('g1', 'g2'), true),
- array(array('g1', 'g2', 'g3'), array('g1', 'g2'), array('g1', 'g2', 'g3'), true),
- );
+ [['g1', 'g2', 'g3'], [], ['g1'], false],
+ [['g1', 'g2', 'g3'], [], [], false],
+ [['g1', 'g2', 'g3'], ['g2'], ['g1'], false],
+ [['g1', 'g2', 'g3'], ['g2'], [], false],
+ [['g1', 'g2', 'g3'], ['g1', 'g2'], ['g1'], false],
+ [['g1', 'g2', 'g3'], ['g1', 'g2'], ['g1', 'g2'], true],
+ [['g1', 'g2', 'g3'], ['g1', 'g2'], ['g1', 'g2', 'g3'], true],
+ ];
}
/**
@@ -250,32 +250,32 @@ class UtilTest extends \Test\TestCase {
}
function defaultAppsProvider() {
- return array(
+ return [
// none specified, default to files
- array(
+ [
'',
'index.php/apps/files/',
- array('files'),
- ),
+ ['files'],
+ ],
// unexisting or inaccessible app specified, default to files
- array(
+ [
'unexist',
'index.php/apps/files/',
- array('files'),
- ),
+ ['files'],
+ ],
// non-standard app
- array(
+ [
'calendar',
'index.php/apps/calendar/',
- array('files', 'calendar'),
- ),
+ ['files', 'calendar'],
+ ],
// non-standard app with fallback
- array(
+ [
'contacts,calendar',
'index.php/apps/calendar/',
- array('files', 'calendar'),
- ),
- );
+ ['files', 'calendar'],
+ ],
+ ];
}
public function testGetDefaultPageUrlWithRedirectUrlWithoutFrontController() {
@@ -319,14 +319,14 @@ class UtilTest extends \Test\TestCase {
$this->assertFalse(\OCP\Util::needUpgrade());
$config->setSystemValue('version', '7.0.0.0');
- \OC::$server->getSession()->set('OC_Version', array(7, 0, 0, 1));
- self::invokePrivate(new \OCP\Util, 'needUpgradeCache', array(null));
+ \OC::$server->getSession()->set('OC_Version', [7, 0, 0, 1]);
+ self::invokePrivate(new \OCP\Util, 'needUpgradeCache', [null]);
$this->assertTrue(\OCP\Util::needUpgrade());
$config->setSystemValue('version', $oldConfigVersion);
\OC::$server->getSession()->set('OC_Version', $oldSessionVersion);
- self::invokePrivate(new \OCP\Util, 'needUpgradeCache', array(null));
+ self::invokePrivate(new \OCP\Util, 'needUpgradeCache', [null]);
$this->assertFalse(\OCP\Util::needUpgrade());
}