From 6cc4f1b53ab8b49864428ae83ce14d0192ad12fa Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 29 Jan 2014 15:57:51 +0100 Subject: [PATCH] Fix authentication backend tests --- test/php/library/Icinga/Authentication/BackendMock.php | 2 +- .../php/library/Icinga/Authentication/LdapUserBackendTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/php/library/Icinga/Authentication/BackendMock.php b/test/php/library/Icinga/Authentication/BackendMock.php index a289b4815..49c4d45ed 100644 --- a/test/php/library/Icinga/Authentication/BackendMock.php +++ b/test/php/library/Icinga/Authentication/BackendMock.php @@ -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(); diff --git a/test/php/library/Icinga/Authentication/LdapUserBackendTest.php b/test/php/library/Icinga/Authentication/LdapUserBackendTest.php index e2d8b0ed0..b0c22edc7 100644 --- a/test/php/library/Icinga/Authentication/LdapUserBackendTest.php +++ b/test/php/library/Icinga/Authentication/LdapUserBackendTest.php @@ -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'))); } /**