11
11
12
12
namespace Symfony \Bundle \FrameworkBundle \Tests \Functional ;
13
13
14
- use Symfony \Component \Security \Core \User \User ;
14
+ use Symfony \Component \Security \Core \User \InMemoryUser ;
15
15
16
16
class SecurityTest extends AbstractWebTestCase
17
17
{
@@ -20,7 +20,7 @@ class SecurityTest extends AbstractWebTestCase
20
20
*/
21
21
public function testLoginUser (string $ username , array $ roles , ?string $ firewallContext )
22
22
{
23
- $ user = new User ($ username , 'the-password ' , $ roles );
23
+ $ user = new InMemoryUser ($ username , 'the-password ' , $ roles );
24
24
$ client = $ this ->createClient (['test_case ' => 'Security ' , 'root_config ' => 'config.yml ' ]);
25
25
26
26
if (null === $ firewallContext ) {
@@ -45,7 +45,7 @@ public function getUsers()
45
45
46
46
public function testLoginUserMultipleRequests ()
47
47
{
48
- $ user = new User ('the-username ' , 'the-password ' , ['ROLE_FOO ' ]);
48
+ $ user = new InMemoryUser ('the-username ' , 'the-password ' , ['ROLE_FOO ' ]);
49
49
$ client = $ this ->createClient (['test_case ' => 'Security ' , 'root_config ' => 'config.yml ' ]);
50
50
$ client ->loginUser ($ user );
51
51
@@ -58,7 +58,7 @@ public function testLoginUserMultipleRequests()
58
58
59
59
public function testLoginInBetweenRequests ()
60
60
{
61
- $ user = new User ('the-username ' , 'the-password ' , ['ROLE_FOO ' ]);
61
+ $ user = new InMemoryUser ('the-username ' , 'the-password ' , ['ROLE_FOO ' ]);
62
62
$ client = $ this ->createClient (['test_case ' => 'Security ' , 'root_config ' => 'config.yml ' ]);
63
63
64
64
$ client ->request ('GET ' , '/main/user_profile ' );
0 commit comments