summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/tests/User
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2020-03-18 17:40:23 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2020-04-14 12:58:28 +0200
commit84619a5b9c58ec7f4e3d7faea8c60a187cb61243 (patch)
tree2572e5f939f8c6bd76b4611c432aad3721b0b62e /apps/user_ldap/tests/User
parente4d378d01e67c41fa64a12662128ba25a0b27133 (diff)
downloadnextcloud-server-84619a5b9c58ec7f4e3d7faea8c60a187cb61243.tar.gz
nextcloud-server-84619a5b9c58ec7f4e3d7faea8c60a187cb61243.zip
use serverControls directly with LDAP calls, fixes 19127
- adapters for PHP API version to Support PHP < 7.3 - switch to pass only one base per search - cookie logic is moved from Access to API adapters Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap/tests/User')
-rw-r--r--apps/user_ldap/tests/User/UserTest.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/user_ldap/tests/User/UserTest.php b/apps/user_ldap/tests/User/UserTest.php
index 8de71b182ba..afefaf04c78 100644
--- a/apps/user_ldap/tests/User/UserTest.php
+++ b/apps/user_ldap/tests/User/UserTest.php
@@ -1197,7 +1197,7 @@ class UserTest extends \Test\TestCase {
$this->access->expects($this->any())
->method('search')
->willReturnCallback(function ($filter, $base) {
- if ($base === [$this->dn]) {
+ if($base === $this->dn) {
return [
[
'pwdchangedtime' => [(new \DateTime())->sub(new \DateInterval('P28D'))->format('Ymdhis').'Z'],
@@ -1205,7 +1205,7 @@ class UserTest extends \Test\TestCase {
],
];
}
- if ($base === ['cn=default,ou=policies,dc=foo,dc=bar']) {
+ if($base === 'cn=default,ou=policies,dc=foo,dc=bar') {
return [
[
'pwdmaxage' => ['2592000'],
@@ -1260,7 +1260,7 @@ class UserTest extends \Test\TestCase {
$this->access->expects($this->any())
->method('search')
->willReturnCallback(function ($filter, $base) {
- if ($base === [$this->dn]) {
+ if($base === $this->dn) {
return [
[
'pwdpolicysubentry' => ['cn=custom,ou=policies,dc=foo,dc=bar'],
@@ -1269,7 +1269,7 @@ class UserTest extends \Test\TestCase {
]
];
}
- if ($base === ['cn=custom,ou=policies,dc=foo,dc=bar']) {
+ if ($base === 'cn=custom,ou=policies,dc=foo,dc=bar') {
return [
[
'pwdmaxage' => ['2592000'],