@@ -41,10 +41,6 @@ class CheckLdapCredentialsListenerTest extends TestCase
41
41
42
42
protected function setUp (): void
43
43
{
44
- if (!interface_exists (AuthenticatorInterface::class)) {
45
- $ this ->markTestSkipped ('This test requires symfony/security-http:^5.1 ' );
46
- }
47
-
48
44
$ this ->ldap = $ this ->createMock (LdapInterface::class);
49
45
}
50
46
@@ -61,10 +57,6 @@ public function testShouldNotCheckPassport($authenticator, $passport)
61
57
62
58
public function provideShouldNotCheckPassport ()
63
59
{
64
- if (!interface_exists (AuthenticatorInterface::class)) {
65
- $ this ->markTestSkipped ('This test requires symfony/security-http:^5.1 ' );
66
- }
67
-
68
60
// no LdapBadge
69
61
yield [new TestAuthenticator (), new Passport (new UserBadge ('test ' ), new PasswordCredentials ('s3cret ' ))];
70
62
@@ -110,10 +102,6 @@ public function testWrongPassport($passport)
110
102
111
103
public function provideWrongPassportData ()
112
104
{
113
- if (!interface_exists (AuthenticatorInterface::class)) {
114
- $ this ->markTestSkipped ('This test requires symfony/security-http:^5.1 ' );
115
- }
116
-
117
105
// no password credentials
118
106
yield [new SelfValidatingPassport (new UserBadge ('test ' ), [new LdapBadge ('app.ldap ' )])];
119
107
}
@@ -222,31 +210,29 @@ private function createListener()
222
210
}
223
211
}
224
212
225
- if (interface_exists (AuthenticatorInterface::class)) {
226
- class TestAuthenticator implements AuthenticatorInterface
213
+ class TestAuthenticator implements AuthenticatorInterface
214
+ {
215
+ public function supports (Request $ request ): ?bool
227
216
{
228
- public function supports (Request $ request ): ?bool
229
- {
230
- }
217
+ }
231
218
232
- public function authenticate (Request $ request ): PassportInterface
233
- {
234
- }
219
+ public function authenticate (Request $ request ): Passport
220
+ {
221
+ }
235
222
236
- public function createAuthenticatedToken (PassportInterface $ passport , string $ firewallName ): TokenInterface
237
- {
238
- }
223
+ public function createAuthenticatedToken (PassportInterface $ passport , string $ firewallName ): TokenInterface
224
+ {
225
+ }
239
226
240
- public function onAuthenticationSuccess (Request $ request , TokenInterface $ token , string $ firewallName ): ?Response
241
- {
242
- }
227
+ public function onAuthenticationSuccess (Request $ request , TokenInterface $ token , string $ firewallName ): ?Response
228
+ {
229
+ }
243
230
244
- public function onAuthenticationFailure (Request $ request , AuthenticationException $ exception ): ?Response
245
- {
246
- }
231
+ public function onAuthenticationFailure (Request $ request , AuthenticationException $ exception ): ?Response
232
+ {
233
+ }
247
234
248
- public function createToken (Passport $ passport , string $ firewallName ): TokenInterface
249
- {
250
- }
235
+ public function createToken (Passport $ passport , string $ firewallName ): TokenInterface
236
+ {
251
237
}
252
238
}
0 commit comments