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 committed Dec 30, 2024
1 parent 9739c71 commit 545d83d
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 545d83d

Please sign in to comment.