1515use Symfony \Bundle \MakerBundle \Security \InteractiveSecurityHelper ;
1616use Symfony \Bundle \MakerBundle \Security \Model \Authenticator ;
1717use Symfony \Bundle \MakerBundle \Security \Model \AuthenticatorType ;
18+ use Symfony \Bundle \MakerBundle \Util \NamespacesHelper ;
1819use Symfony \Component \Console \Style \SymfonyStyle ;
1920
2021class InteractiveSecurityHelperTest extends TestCase
@@ -30,7 +31,7 @@ public function testGuessFirewallName(array $securityData, string $expectedFirew
3031 ->method ('choice ' )
3132 ->willReturn ($ expectedFirewallName );
3233
33- $ helper = new InteractiveSecurityHelper ();
34+ $ helper = new InteractiveSecurityHelper (new NamespacesHelper () );
3435 $ this ->assertEquals (
3536 $ expectedFirewallName ,
3637 $ helper ->guessFirewallName ($ io , $ securityData )
@@ -88,7 +89,7 @@ public function testGuessUserClass(array $securityData, string $expectedUserClas
8889 ->method ('ask ' )
8990 ->willReturn ($ expectedUserClass );
9091
91- $ helper = new InteractiveSecurityHelper ();
92+ $ helper = new InteractiveSecurityHelper (new NamespacesHelper () );
9293 $ this ->assertEquals (
9394 $ expectedUserClass ,
9495 $ helper ->guessUserClass ($ io , $ securityData )
@@ -128,7 +129,7 @@ public function testGuessUserNameField(array $providers, string $expectedUsernam
128129 ->with (\sprintf ('Which field on your <fg=yellow>%s</> class will people enter when logging in? ' , $ class ), $ choices , 'username ' )
129130 ->willReturn ($ expectedUsernameField );
130131
131- $ interactiveSecurityHelper = new InteractiveSecurityHelper ();
132+ $ interactiveSecurityHelper = new InteractiveSecurityHelper (new NamespacesHelper () );
132133 $ this ->assertEquals (
133134 $ expectedUsernameField ,
134135 $ interactiveSecurityHelper ->guessUserNameField ($ io , $ class , $ providers )
@@ -185,7 +186,7 @@ public function testGuessEmailField(string $expectedEmailField, bool $fieldAutom
185186 ->with (\sprintf ('Which field on your <fg=yellow>%s</> class holds the email address? ' , $ class ), $ choices , null )
186187 ->willReturn ($ expectedEmailField );
187188
188- $ interactiveSecurityHelper = new InteractiveSecurityHelper ();
189+ $ interactiveSecurityHelper = new InteractiveSecurityHelper (new NamespacesHelper () );
189190 $ this ->assertEquals (
190191 $ expectedEmailField ,
191192 $ interactiveSecurityHelper ->guessEmailField ($ io , $ class )
@@ -211,7 +212,7 @@ public function guessEmailFieldTest()
211212 /** @dataProvider authenticatorClassProvider */
212213 public function testGetAuthenticatorsFromConfig (array $ firewalls , array $ expectedResults ): void
213214 {
214- $ helper = new InteractiveSecurityHelper ();
215+ $ helper = new InteractiveSecurityHelper (new NamespacesHelper () );
215216 $ result = $ helper ->getAuthenticatorsFromConfig ($ firewalls );
216217
217218 self ::assertEquals ($ expectedResults , $ result );
@@ -287,7 +288,7 @@ public function testGuessPasswordSetter(string $expectedPasswordSetter, bool $au
287288 ->with (\sprintf ('Which method on your <fg=yellow>%s</> class can be used to set the encoded password (e.g. setPassword())? ' , $ class ), $ choices , null )
288289 ->willReturn ($ expectedPasswordSetter );
289290
290- $ interactiveSecurityHelper = new InteractiveSecurityHelper ();
291+ $ interactiveSecurityHelper = new InteractiveSecurityHelper (new NamespacesHelper () );
291292 $ this ->assertEquals (
292293 $ expectedPasswordSetter ,
293294 $ interactiveSecurityHelper ->guessPasswordSetter ($ io , $ class )
@@ -322,7 +323,7 @@ public function testGuessEmailGetter(string $expectedEmailGetter, string $emailA
322323 ->with (\sprintf ('Which method on your <fg=yellow>%s</> class can be used to get the email address (e.g. getEmail())? ' , $ class ), $ choices , null )
323324 ->willReturn ($ expectedEmailGetter );
324325
325- $ interactiveSecurityHelper = new InteractiveSecurityHelper ();
326+ $ interactiveSecurityHelper = new InteractiveSecurityHelper (new NamespacesHelper () );
326327 $ this ->assertEquals (
327328 $ expectedEmailGetter ,
328329 $ interactiveSecurityHelper ->guessEmailGetter ($ io , $ class , $ emailAttribute )
0 commit comments