1111
1212namespace Symfony \Bundle \FrameworkBundle \Tests \Functional ;
1313
14- use Symfony \Component \Security \Core \User \User ;
14+ use Symfony \Component \Security \Core \User \InMemoryUser ;
1515
1616class SecurityTest extends AbstractWebTestCase
1717{
@@ -20,7 +20,7 @@ class SecurityTest extends AbstractWebTestCase
2020 */
2121 public function testLoginUser (string $ username , array $ roles , ?string $ firewallContext )
2222 {
23- $ user = new User ($ username , 'the-password ' , $ roles );
23+ $ user = new InMemoryUser ($ username , 'the-password ' , $ roles );
2424 $ client = $ this ->createClient (['test_case ' => 'Security ' , 'root_config ' => 'config.yml ' ]);
2525
2626 if (null === $ firewallContext ) {
@@ -45,7 +45,7 @@ public function getUsers()
4545
4646 public function testLoginUserMultipleRequests ()
4747 {
48- $ user = new User ('the-username ' , 'the-password ' , ['ROLE_FOO ' ]);
48+ $ user = new InMemoryUser ('the-username ' , 'the-password ' , ['ROLE_FOO ' ]);
4949 $ client = $ this ->createClient (['test_case ' => 'Security ' , 'root_config ' => 'config.yml ' ]);
5050 $ client ->loginUser ($ user );
5151
@@ -58,7 +58,7 @@ public function testLoginUserMultipleRequests()
5858
5959 public function testLoginInBetweenRequests ()
6060 {
61- $ user = new User ('the-username ' , 'the-password ' , ['ROLE_FOO ' ]);
61+ $ user = new InMemoryUser ('the-username ' , 'the-password ' , ['ROLE_FOO ' ]);
6262 $ client = $ this ->createClient (['test_case ' => 'Security ' , 'root_config ' => 'config.yml ' ]);
6363
6464 $ client ->request ('GET ' , '/main/user_profile ' );
0 commit comments