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/Group/ManagerTest.php
parent62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff)
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/Group/ManagerTest.php')
-rw-r--r--tests/lib/Group/ManagerTest.php34
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/lib/Group/ManagerTest.php b/tests/lib/Group/ManagerTest.php
index 8385c924edf..73b315ac297 100644
--- a/tests/lib/Group/ManagerTest.php
+++ b/tests/lib/Group/ManagerTest.php
@@ -255,7 +255,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('getGroups')
->with('1')
- ->willReturn(array('group1'));
+ ->willReturn(['group1']);
$backend->expects($this->once())
->method('groupExists')
->with('group1')
@@ -278,7 +278,7 @@ class ManagerTest extends TestCase {
$backend1->expects($this->once())
->method('getGroups')
->with('1')
- ->willReturn(array('group1'));
+ ->willReturn(['group1']);
$backend1->expects($this->any())
->method('groupExists')
->willReturn(true);
@@ -290,7 +290,7 @@ class ManagerTest extends TestCase {
$backend2->expects($this->once())
->method('getGroups')
->with('1')
- ->willReturn(array('group12', 'group1'));
+ ->willReturn(['group12', 'group1']);
$backend2->expects($this->any())
->method('groupExists')
->willReturn(true);
@@ -315,7 +315,7 @@ class ManagerTest extends TestCase {
$backend1->expects($this->once())
->method('getGroups')
->with('1', 2, 1)
- ->willReturn(array('group1'));
+ ->willReturn(['group1']);
$backend1->expects($this->any())
->method('groupExists')
->willReturn(true);
@@ -327,7 +327,7 @@ class ManagerTest extends TestCase {
$backend2->expects($this->once())
->method('getGroups')
->with('1', 2, 1)
- ->willReturn(array('group12'));
+ ->willReturn(['group12']);
$backend2->expects($this->any())
->method('groupExists')
->willReturn(true);
@@ -374,7 +374,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('getUserGroups')
->with('user1')
- ->willReturn(array('group1'));
+ ->willReturn(['group1']);
$backend->expects($this->any())
->method('groupExists')
->with('group1')
@@ -421,7 +421,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('getUserGroups')
->with('user1')
- ->willReturn(array('group1'));
+ ->willReturn(['group1']);
$backend->expects($this->any())
->method('groupExists')
->with('group1')
@@ -448,7 +448,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('getUserGroups')
->with('user1')
- ->willReturn(array('group1', 'admin', 'group2'));
+ ->willReturn(['group1', 'admin', 'group2']);
$backend->expects($this->any())
->method('groupExists')
->willReturn(true);
@@ -467,7 +467,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('getUserGroups')
->with('user1')
- ->willReturn(array('group1', 'admin', 'group2'));
+ ->willReturn(['group1', 'admin', 'group2']);
$backend->expects($this->any())
->method('groupExists')
->willReturn(true);
@@ -486,7 +486,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('getUserGroups')
->with('user1')
- ->willReturn(array('group1', 'group2'));
+ ->willReturn(['group1', 'group2']);
$backend->expects($this->any())
->method('groupExists')
->willReturn(true);
@@ -505,7 +505,7 @@ class ManagerTest extends TestCase {
$backend1->expects($this->once())
->method('getUserGroups')
->with('user1')
- ->willReturn(array('group1'));
+ ->willReturn(['group1']);
$backend1->expects($this->any())
->method('groupExists')
->willReturn(true);
@@ -517,7 +517,7 @@ class ManagerTest extends TestCase {
$backend2->expects($this->once())
->method('getUserGroups')
->with('user1')
- ->willReturn(array('group1', 'group2'));
+ ->willReturn(['group1', 'group2']);
$backend1->expects($this->any())
->method('groupExists')
->willReturn(true);
@@ -730,7 +730,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('usersInGroup')
->with('testgroup', '', -1, 0)
- ->willReturn(array('user2', 'user33'));
+ ->willReturn(['user2', 'user33']);
$this->userManager->expects($this->any())
->method('get')
@@ -769,7 +769,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('usersInGroup')
->with('testgroup', '', 1, 0)
- ->willReturn(array('user2'));
+ ->willReturn(['user2']);
$this->userManager->expects($this->any())
->method('get')
@@ -808,7 +808,7 @@ class ManagerTest extends TestCase {
$backend->expects($this->once())
->method('usersInGroup')
->with('testgroup', '', 1, 1)
- ->willReturn(array('user33'));
+ ->willReturn(['user33']);
$this->userManager->expects($this->any())
->method('get')
@@ -857,7 +857,7 @@ class ManagerTest extends TestCase {
// prime cache
$user1 = $this->getTestUser('user1');
$groups = $manager->getUserGroups($user1);
- $this->assertEquals(array(), $groups);
+ $this->assertEquals([], $groups);
// add user
$group = $manager->get('group1');
@@ -907,7 +907,7 @@ class ManagerTest extends TestCase {
// remove user
$group = $manager->get('group1');
$group->removeUser($user1);
- $expectedGroups = array();
+ $expectedGroups = [];
// check result
$groups = $manager->getUserGroups($user1);