Browse Source

Fix ldap tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
tags/v13.0.0beta1
Roeland Jago Douma 6 years ago
parent
commit
c6f6413bb1
No account linked to committer's email address
2 changed files with 11 additions and 0 deletions
  1. 2
    0
      apps/user_ldap/tests/User/UserTest.php
  2. 9
    0
      apps/user_ldap/tests/User_LDAPTest.php

+ 2
- 0
apps/user_ldap/tests/User/UserTest.php View File

@@ -1269,6 +1269,7 @@ class UserTest extends \Test\TestCase {
return array(
array(
'pwdchangedtime' => array((new \DateTime())->sub(new \DateInterval('P28D'))->format('Ymdhis').'Z'),
'pwdgraceusetime' => [],
),
);
}
@@ -1342,6 +1343,7 @@ class UserTest extends \Test\TestCase {
array(
'pwdpolicysubentry' => array('cn=custom,ou=policies,dc=foo,dc=bar'),
'pwdchangedtime' => array((new \DateTime())->sub(new \DateInterval('P28D'))->format('Ymdhis').'Z'),
'pwdgraceusetime' => [],
)
);
}

+ 9
- 0
apps/user_ldap/tests/User_LDAPTest.php View File

@@ -135,6 +135,9 @@ class User_LDAPTest extends TestCase {
return false;
}
}));

$access->method('fetchUsersByLoginName')
->willReturn([]);
}

/**
@@ -353,6 +356,9 @@ class User_LDAPTest extends TestCase {
$access->expects($this->any())
->method('nextcloudUserNames')
->will($this->returnArgument(0));

$access->method('fetchUsersByLoginName')
->willReturn([]);
}

public function testGetUsersNoParam() {
@@ -760,6 +766,9 @@ class User_LDAPTest extends TestCase {
$access->expects($this->any())
->method('getUserMapper')
->will($this->returnValue($userMapper));

$access->method('fetchUsersByLoginName')
->willReturn([]);
}

public function testGetDisplayName() {

Loading…
Cancel
Save