@@ -40,10 +40,6 @@ class CheckLdapCredentialsListenerTest extends TestCase
40
40
41
41
protected function setUp (): void
42
42
{
43
- if (!interface_exists (AuthenticatorInterface::class)) {
44
- $ this ->markTestSkipped ('This test requires symfony/security-http:^5.1 ' );
45
- }
46
-
47
43
$ this ->ldap = $ this ->createMock (LdapInterface::class);
48
44
}
49
45
@@ -60,10 +56,6 @@ public function testShouldNotCheckPassport($authenticator, $passport)
60
56
61
57
public function provideShouldNotCheckPassport ()
62
58
{
63
- if (!interface_exists (AuthenticatorInterface::class)) {
64
- $ this ->markTestSkipped ('This test requires symfony/security-http:^5.1 ' );
65
- }
66
-
67
59
// no LdapBadge
68
60
yield [new TestAuthenticator (), new Passport (new UserBadge ('test ' ), new PasswordCredentials ('s3cret ' ))];
69
61
@@ -109,10 +101,6 @@ public function testWrongPassport($passport)
109
101
110
102
public function provideWrongPassportData ()
111
103
{
112
- if (!interface_exists (AuthenticatorInterface::class)) {
113
- $ this ->markTestSkipped ('This test requires symfony/security-http:^5.1 ' );
114
- }
115
-
116
104
// no password credentials
117
105
yield [new SelfValidatingPassport (new UserBadge ('test ' ), [new LdapBadge ('app.ldap ' )])];
118
106
}
@@ -204,31 +192,29 @@ private function createListener()
204
192
}
205
193
}
206
194
207
- if (interface_exists (AuthenticatorInterface::class)) {
208
- class TestAuthenticator implements AuthenticatorInterface
195
+ class TestAuthenticator implements AuthenticatorInterface
196
+ {
197
+ public function supports (Request $ request ): ?bool
209
198
{
210
- public function supports (Request $ request ): ?bool
211
- {
212
- }
199
+ }
213
200
214
- public function authenticate (Request $ request ): Passport
215
- {
216
- }
201
+ public function authenticate (Request $ request ): Passport
202
+ {
203
+ }
217
204
218
- public function createAuthenticatedToken (Passport $ passport , string $ firewallName ): TokenInterface
219
- {
220
- }
205
+ public function createAuthenticatedToken (PassportInterface $ passport , string $ firewallName ): TokenInterface
206
+ {
207
+ }
221
208
222
- public function onAuthenticationSuccess (Request $ request , TokenInterface $ token , string $ firewallName ): ?Response
223
- {
224
- }
209
+ public function onAuthenticationSuccess (Request $ request , TokenInterface $ token , string $ firewallName ): ?Response
210
+ {
211
+ }
225
212
226
- public function onAuthenticationFailure (Request $ request , AuthenticationException $ exception ): ?Response
227
- {
228
- }
213
+ public function onAuthenticationFailure (Request $ request , AuthenticationException $ exception ): ?Response
214
+ {
215
+ }
229
216
230
- public function createToken (Passport $ passport , string $ firewallName ): TokenInterface
231
- {
232
- }
217
+ public function createToken (Passport $ passport , string $ firewallName ): TokenInterface
218
+ {
233
219
}
234
220
}
0 commit comments