33namespace BabDev \WebSocketBundle \Tests \Authentication ;
44
55use BabDev \WebSocket \Server \Connection ;
6- use BabDev \WebSocketBundle \Authentication \DefaultAuthenticator ;
6+ use BabDev \WebSocketBundle \Authentication \ProviderBackedAuthenticator ;
77use BabDev \WebSocketBundle \Authentication \Provider \AuthenticationProvider ;
88use BabDev \WebSocketBundle \Authentication \Storage \TokenStorage ;
99use PHPUnit \Framework \MockObject \MockObject ;
1010use PHPUnit \Framework \TestCase ;
1111use Symfony \Component \Security \Core \Authentication \Token \TokenInterface ;
1212
13- final class DefaultAuthenticatorTest extends TestCase
13+ final class ProviderBackedAuthenticatorTest extends TestCase
1414{
1515 public function testTheAuthenticatorDoesNotAuthenticateAConnectionWhenItHasNoProviders (): void
1616 {
@@ -25,7 +25,7 @@ public function testTheAuthenticatorDoesNotAuthenticateAConnectionWhenItHasNoPro
2525 $ tokenStorage ->expects (self ::never ())
2626 ->method ('addToken ' );
2727
28- new DefaultAuthenticator ([], $ tokenStorage )->authenticate ($ connection );
28+ new ProviderBackedAuthenticator ([], $ tokenStorage )->authenticate ($ connection );
2929 }
3030
3131 public function testTheAuthenticatorAuthenticatesAConnectionWhenItHasOneProvider (): void
@@ -59,7 +59,7 @@ public function testTheAuthenticatorAuthenticatesAConnectionWhenItHasOneProvider
5959 ->with ($ connection )
6060 ->willReturn ($ token );
6161
62- new DefaultAuthenticator ([$ authenticationProvider ], $ tokenStorage )->authenticate ($ connection );
62+ new ProviderBackedAuthenticator ([$ authenticationProvider ], $ tokenStorage )->authenticate ($ connection );
6363 }
6464
6565 public function testTheAuthenticatorAuthenticatesAConnectionUsingTheFirstSupportedProvider (): void
@@ -111,6 +111,6 @@ public function testTheAuthenticatorAuthenticatesAConnectionUsingTheFirstSupport
111111 $ authenticationProvider3 ->expects (self ::never ())
112112 ->method ('authenticate ' );
113113
114- new DefaultAuthenticator ([$ authenticationProvider1 , $ authenticationProvider2 , $ authenticationProvider3 ], $ tokenStorage )->authenticate ($ connection );
114+ new ProviderBackedAuthenticator ([$ authenticationProvider1 , $ authenticationProvider2 , $ authenticationProvider3 ], $ tokenStorage )->authenticate ($ connection );
115115 }
116116}
0 commit comments