Skip to content

Commit

Permalink
[Security] Refactored Symfony User mocking for Symfony 6
Browse files Browse the repository at this point in the history
  • Loading branch information
alongosz authored and adamwojs committed Feb 4, 2025
1 parent ee6ca39 commit 905c441
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/contracts/WebTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private function getUser(): UserWrapped
$apiUser = $userService->loadUserByLogin('admin');
$symfonyUser = $this->createMock(UserInterface::class);
$symfonyUser->method('getRoles')->willReturn(['ROLE_USER']);
$symfonyUser->method('getUsername')->willReturn('admin');
$symfonyUser->method('getUserIdentifier')->willReturn('admin');

return new UserWrapped($symfonyUser, $apiUser);
}
Expand Down

0 comments on commit 905c441

Please sign in to comment.