@@ -20,7 +20,7 @@ class OAuthListenerTest extends TestCase
20
20
21
21
protected $ authManager ;
22
22
23
- protected $ tokenStorage ;
23
+ protected $ securityContext ;
24
24
25
25
protected $ event ;
26
26
@@ -35,10 +35,10 @@ public function setUp()
35
35
->getMock ('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface ' );
36
36
37
37
if (interface_exists ('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface ' )) {
38
- $ this ->tokenStorage = $ this
38
+ $ this ->securityContext = $ this
39
39
->getMock ('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface ' );
40
40
} else {
41
- $ this ->tokenStorage = $ this
41
+ $ this ->securityContext = $ this
42
42
->getMock ('Symfony\Component\Security\Core\SecurityContextInterface ' );
43
43
}
44
44
@@ -50,7 +50,7 @@ public function setUp()
50
50
51
51
public function testHandle ()
52
52
{
53
- $ listener = new OAuthListener ($ this ->tokenStorage , $ this ->authManager , $ this ->serverService );
53
+ $ listener = new OAuthListener ($ this ->securityContext , $ this ->authManager , $ this ->serverService );
54
54
55
55
$ this ->serverService
56
56
->expects ($ this ->once ())
@@ -62,7 +62,7 @@ public function testHandle()
62
62
->method ('authenticate ' )
63
63
->will ($ this ->returnArgument (0 ));
64
64
65
- $ this ->tokenStorage
65
+ $ this ->securityContext
66
66
->expects ($ this ->once ())
67
67
->method ('setToken ' )
68
68
->will ($ this ->returnArgument (0 ));
@@ -75,7 +75,7 @@ public function testHandle()
75
75
76
76
public function testHandleResponse ()
77
77
{
78
- $ listener = new OAuthListener ($ this ->tokenStorage , $ this ->authManager , $ this ->serverService );
78
+ $ listener = new OAuthListener ($ this ->securityContext , $ this ->authManager , $ this ->serverService );
79
79
80
80
$ this ->serverService
81
81
->expects ($ this ->once ())
@@ -89,7 +89,7 @@ public function testHandleResponse()
89
89
->method ('authenticate ' )
90
90
->will ($ this ->returnValue ($ response ));
91
91
92
- $ this ->tokenStorage
92
+ $ this ->securityContext
93
93
->expects ($ this ->never ())
94
94
->method ('setToken ' );
95
95
0 commit comments