Skip to content

Commit 8bb88bb

Browse files
committed
tests bug fix
Signed-off-by: MarioRadu <magda_marior@yahoo.com>
1 parent 8f59cac commit 8bb88bb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/Unit/Admin/Handler/Account/PostAccountLoginHandlerTest.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,19 @@ public function testAdminAlreadyLoggedWillReturnRedirectResponse(): void
8888
$this->assertSame(StatusCodeInterface::STATUS_FOUND, $response->getStatusCode());
8989
}
9090

91+
/**
92+
* @throws MockObjectException
93+
*/
9194
public function testInvalidLoginFormDataProvidedWillReturnRedirectResponse(): void
9295
{
9396
$this->authenticationService->method('hasIdentity')->willReturn(false);
94-
$this->request->method('getParsedBody')->willReturn(['test']);
9597
$this->loginForm->method('isValid')->willReturn(false);
98+
$this->request->method('getParsedBody')->willReturn(['test']);
99+
$this->request->method('getQueryParams')->willReturn([]);
100+
$this->request->method('getServerParams')->willReturn([]);
101+
$this->request->method('getUri')->willReturn(
102+
$this->createMock(UriInterface::class)
103+
);
96104

97105
$this
98106
->messenger

0 commit comments

Comments
 (0)