From 9151960af0ed421bb729b62a16cfb0cbb0d7f730 Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Tue, 25 Oct 2022 15:38:31 +0200 Subject: Skip general login with email for non-valid addresses and LDAP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- tests/lib/Authentication/Login/EmailLoginCommandTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/lib/Authentication/Login/EmailLoginCommandTest.php b/tests/lib/Authentication/Login/EmailLoginCommandTest.php index 9de372148b9..0e70c40a1df 100644 --- a/tests/lib/Authentication/Login/EmailLoginCommandTest.php +++ b/tests/lib/Authentication/Login/EmailLoginCommandTest.php @@ -55,7 +55,7 @@ class EmailLoginCommandTest extends ALoginCommandTest { public function testProcessNotAnEmailLogin() { $data = $this->getFailedLoginData(); - $this->userManager->expects($this->once()) + $this->userManager->expects($this->never()) ->method('getByEmail') ->with($this->username) ->willReturn([]); @@ -67,9 +67,10 @@ class EmailLoginCommandTest extends ALoginCommandTest { public function testProcessDuplicateEmailLogin() { $data = $this->getFailedLoginData(); + $data->setUsername('user@example.com'); $this->userManager->expects($this->once()) ->method('getByEmail') - ->with($this->username) + ->with('user@example.com') ->willReturn([ $this->createMock(IUser::class), $this->createMock(IUser::class), -- cgit v1.2.3