summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/tests/User_LDAPTest.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-26 09:30:18 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-03-26 16:34:56 +0100
commitb80ebc96748b45fd2e0ba9323308657c4b00b7ec (patch)
treeec20e0ffa2f86b9b54939a83a785407319f94559 /apps/user_ldap/tests/User_LDAPTest.php
parent62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff)
downloadnextcloud-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/User_LDAPTest.php')
-rw-r--r--apps/user_ldap/tests/User_LDAPTest.php36
1 files changed, 18 insertions, 18 deletions
diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php
index f3052b19327..baa307b2e6b 100644
--- a/apps/user_ldap/tests/User_LDAPTest.php
+++ b/apps/user_ldap/tests/User_LDAPTest.php
@@ -149,17 +149,17 @@ class User_LDAPTest extends TestCase {
->method('fetchListOfUsers')
->willReturnCallback(function($filter) {
if($filter === 'roland') {
- return array(array('dn' => ['dnOfRoland,dc=test']));
+ return [['dn' => ['dnOfRoland,dc=test']]];
}
- return array();
+ return [];
});
$this->access->expects($this->any())
->method('fetchUsersByLoginName')
->willReturnCallback(function($uid) {
if($uid === 'roland') {
- return array(array('dn' => ['dnOfRoland,dc=test']));
+ return [['dn' => ['dnOfRoland,dc=test']]];
}
- return array();
+ return [];
});
$retVal = 'gunslinger';
@@ -378,11 +378,11 @@ class User_LDAPTest extends TestCase {
$this->access->expects($this->any())
->method('fetchListOfUsers')
->willReturnCallback(function($search, $a, $l, $o) {
- $users = array('gunslinger', 'newyorker', 'ladyofshadows');
+ $users = ['gunslinger', 'newyorker', 'ladyofshadows'];
if(empty($search)) {
$result = $users;
} else {
- $result = array();
+ $result = [];
foreach($users as $user) {
if(stripos($user, $search) !== false) {
$result[] = $user;
@@ -545,7 +545,7 @@ class User_LDAPTest extends TestCase {
->method('readAttribute')
->willReturnCallback(function($dn) {
if($dn === 'dnOfRoland,dc=test') {
- return array();
+ return [];
}
return false;
});
@@ -570,7 +570,7 @@ class User_LDAPTest extends TestCase {
->method('readAttribute')
->willReturnCallback(function($dn) {
if($dn === 'dnOfRoland,dc=test') {
- return array();
+ return [];
}
return false;
});
@@ -613,9 +613,9 @@ class User_LDAPTest extends TestCase {
switch ($dn) {
case 'dnOfRoland,dc=test':
if($attr === 'testAttribute') {
- return array('/tmp/rolandshome/');
+ return ['/tmp/rolandshome/'];
}
- return array();
+ return [];
break;
default:
return false;
@@ -665,9 +665,9 @@ class User_LDAPTest extends TestCase {
switch ($dn) {
case 'dnOfLadyOfShadows,dc=test':
if($attr === 'testAttribute') {
- return array('susannah/');
+ return ['susannah/'];
}
- return array();
+ return [];
break;
default:
return false;
@@ -821,9 +821,9 @@ class User_LDAPTest extends TestCase {
switch ($dn) {
case 'dnOfRoland,dc=test':
if($attr === 'displayname') {
- return array('Roland Deschain');
+ return ['Roland Deschain'];
}
- return array();
+ return [];
break;
default:
@@ -1156,17 +1156,17 @@ class User_LDAPTest extends TestCase {
->method('fetchListOfUsers')
->willReturnCallback(function($filter) {
if($filter === 'roland') {
- return array(array('dn' => ['dnOfRoland,dc=test']));
+ return [['dn' => ['dnOfRoland,dc=test']]];
}
- return array();
+ return [];
});
$this->access->expects($this->any())
->method('fetchUsersByLoginName')
->willReturnCallback(function($uid) {
if($uid === 'roland') {
- return array(array('dn' => ['dnOfRoland,dc=test']));
+ return [['dn' => ['dnOfRoland,dc=test']]];
}
- return array();
+ return [];
});
$this->access->expects($this->any())
->method('dn2username')