Fix authentication backend tests
This commit is contained in:
parent
f4a00d24e5
commit
6cc4f1b53a
|
@ -111,7 +111,7 @@ class BackendMock implements UserBackend
|
|||
public function authenticate(Credential $credentials)
|
||||
{
|
||||
if (!in_array($credentials, $this->allowedCredentials)) {
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
return self::getDummyUser();
|
||||
|
|
|
@ -211,14 +211,14 @@ class LdapUserBackendTest extends BaseTestCase
|
|||
$backend->authenticate(new Credential('jwoe', 'passjwoe'))
|
||||
);
|
||||
|
||||
$this->assertFalse($backend->authenticate(new Credential('jwoe', 'passjwoe22')));
|
||||
$this->assertNull($backend->authenticate(new Credential('jwoe', 'passjwoe22')));
|
||||
|
||||
$this->assertInstanceOf(
|
||||
'\Icinga\User',
|
||||
$backend->authenticate(new Credential('rmiles', 'passrmiles'))
|
||||
);
|
||||
|
||||
$this->assertFalse($backend->authenticate(new Credential('rmiles', 'passrmiles33')));
|
||||
$this->assertNull($backend->authenticate(new Credential('rmiles', 'passrmiles33')));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue