diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 09:30:18 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 16:34:56 +0100 |
commit | b80ebc96748b45fd2e0ba9323308657c4b00b7ec (patch) | |
tree | ec20e0ffa2f86b9b54939a83a785407319f94559 /apps/user_ldap/tests/Group_LDAPTest.php | |
parent | 62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff) | |
download | nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.tar.gz nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.zip |
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/user_ldap/tests/Group_LDAPTest.php')
-rw-r--r-- | apps/user_ldap/tests/Group_LDAPTest.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/apps/user_ldap/tests/Group_LDAPTest.php b/apps/user_ldap/tests/Group_LDAPTest.php index 5fdc3c5862c..d5a6f3b712c 100644 --- a/apps/user_ldap/tests/Group_LDAPTest.php +++ b/apps/user_ldap/tests/Group_LDAPTest.php @@ -229,7 +229,7 @@ class Group_LDAPTest extends TestCase { $access->expects($this->once()) ->method('searchGroups') - ->willReturn(array()); + ->willReturn([]); $access->expects($this->never()) ->method('dn2groupname'); @@ -276,7 +276,7 @@ class Group_LDAPTest extends TestCase { $access->expects($this->once()) ->method('readAttribute') ->with($dn, $attr) - ->willReturn(array('3117')); + ->willReturn(['3117']); $groupBackend = new GroupLDAP($access, $pluginManager); @@ -376,7 +376,7 @@ class Group_LDAPTest extends TestCase { $access->expects($this->once()) ->method('searchGroups') - ->willReturn(array()); + ->willReturn([]); $access->expects($this->never()) ->method('dn2groupname'); @@ -430,7 +430,7 @@ class Group_LDAPTest extends TestCase { $access->expects($this->once()) ->method('readAttribute') ->with($dn, $attr) - ->willReturn(array('3117')); + ->willReturn(['3117']); $groupBackend = new GroupLDAP($access, $pluginManager); @@ -496,7 +496,7 @@ class Group_LDAPTest extends TestCase { $access->expects($this->once()) ->method('nextcloudGroupNames') - ->willReturn(array('group1', 'group2')); + ->willReturn(['group1', 'group2']); $groupBackend = new GroupLDAP($access, $pluginManager); $groups = $groupBackend->getGroups('', 2, 2); @@ -521,11 +521,11 @@ class Group_LDAPTest extends TestCase { ->method('readAttribute') ->willReturnCallback(function($dn, $attr) { if($attr === 'primaryGroupToken') { - return array(1337); + return [1337]; } else if($attr === 'gidNumber') { return [4211]; } - return array(); + return []; }); $access->expects($this->any()) ->method('groupname2dn') @@ -558,16 +558,16 @@ class Group_LDAPTest extends TestCase { ->method('readAttribute') ->willReturnCallback(function($dn, $attr) { if($attr === 'primaryGroupToken') { - return array(1337); + return [1337]; } - return array(); + return []; }); $access->expects($this->any()) ->method('groupname2dn') ->willReturn('cn=foobar,dc=foo,dc=bar'); $access->expects($this->once()) ->method('nextcloudUserNames') - ->willReturn(array('lisa', 'bart', 'kira', 'brad')); + ->willReturn(['lisa', 'bart', 'kira', 'brad']); $access->userManager = $this->createMock(Manager::class); $groupBackend = new GroupLDAP($access, $pluginManager); @@ -594,9 +594,9 @@ class Group_LDAPTest extends TestCase { ->method('readAttribute') ->willReturnCallback(function($dn, $attr) { if($attr === 'primaryGroupToken') { - return array(1337); + return [1337]; } - return array(); + return []; }); $access->expects($this->any()) |