File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
tests/Security/Http/Authenticator Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -125,19 +125,15 @@ private function stubRememberMeSetsTrusted(bool $rememberMeSetsTrusted): void
125125 private function createTwoFactorToken (TokenInterface |null $ authenticatedToken = null , bool $ allProvidersAuthenticated = false ): MockObject |TwoFactorTokenInterface
126126 {
127127 $ user = $ this ->createMock (UserInterface::class);
128- // Compatibility for Symfony < 6.0
129- if (method_exists (UserInterface::class, 'getUserIdentifier ' )) {
130- $ user
131- ->expects ($ this ->any ())
132- ->method ('getUserIdentifier ' )
133- ->willReturn (self ::USERNAME );
134- }
135-
136128 $ token = $ this ->createMock (TwoFactorTokenInterface::class);
137129 $ token
138130 ->expects ($ this ->any ())
139131 ->method ('getUser ' )
140132 ->willReturn ($ user );
133+ $ token
134+ ->expects ($ this ->any ())
135+ ->method ('getUserIdentifier ' )
136+ ->willReturn (self ::USERNAME );
141137 $ token
142138 ->expects ($ this ->any ())
143139 ->method ('getAuthenticatedToken ' )
You can’t perform that action at this time.
0 commit comments