mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 09:13:19 -04:00
adjust tests
This commit is contained in:
parent
5355c285fc
commit
40edaa5a69
1 changed files with 9 additions and 6 deletions
|
|
@ -108,12 +108,6 @@ class Test_User_Ldap_Direct extends \Test\TestCase {
|
|||
* @return void
|
||||
*/
|
||||
private function prepareAccessForCheckPassword(&$access, $noDisplayName = false) {
|
||||
$access->expects($this->once())
|
||||
->method('escapeFilterPart')
|
||||
->will($this->returnCallback(function($uid) {
|
||||
return $uid;
|
||||
}));
|
||||
|
||||
$access->connection->expects($this->any())
|
||||
->method('__get')
|
||||
->will($this->returnCallback(function($name) {
|
||||
|
|
@ -132,6 +126,15 @@ class Test_User_Ldap_Direct extends \Test\TestCase {
|
|||
return array();
|
||||
}));
|
||||
|
||||
$access->expects($this->any())
|
||||
->method('fetchUsersByLoginName')
|
||||
->will($this->returnCallback(function($uid) {
|
||||
if($uid === 'roland') {
|
||||
return array(array('dn' => 'dnOfRoland,dc=test'));
|
||||
}
|
||||
return array();
|
||||
}));
|
||||
|
||||
$retVal = 'gunslinger';
|
||||
if($noDisplayName === true) {
|
||||
$retVal = false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue