Skip to content

Commit 45f6472

Browse files
committed
test fix
Signed-off-by: alexmerlin <alex.merlin.1985@gmail.com>
1 parent c0dcf63 commit 45f6472

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ public function testAdminLoginThrowsExceptionWillReturnRedirectResponse(): void
243243
$this->assertSame(StatusCodeInterface::STATUS_INTERNAL_SERVER_ERROR, $response->getStatusCode());
244244
}
245245

246+
/**
247+
* @throws MockObjectException
248+
*/
246249
public function testAdminLoginSuccessfulWillReturnRedirectResponse(): void
247250
{
248251
$this->identity->method('isActive')->willReturn(true);
@@ -254,7 +257,9 @@ public function testAdminLoginSuccessfulWillReturnRedirectResponse(): void
254257
$this->authenticationService->method('getStorage')->willReturn($this->storage);
255258
$this->request->method('getParsedBody')->willReturn(['test']);
256259
$this->request->method('getServerParams')->willReturn([]);
257-
$this->request->method('getUri')->willReturn('/test');
260+
$this->request->method('getUri')->willReturn(
261+
$this->createMock(UriInterface::class),
262+
);
258263
$this->loginForm->method('isValid')->willReturn(true);
259264
$this->loginForm->method('getData')->willReturn(['identity' => 'test', 'password' => 'test']);
260265
$this->authenticationAdapter->method('setIdentity')->willReturn($this->authenticationAdapter);

0 commit comments

Comments
 (0)