@@ -39,7 +39,7 @@ public function testUnsupportedStrategy()
39
39
40
40
public function testSessionIsMigrated ()
41
41
{
42
- $ session = $ this ->getMock ('Symfony\Component\HttpFoundation\Session\SessionInterface ' );
42
+ $ session = $ this ->getMockBuilder ('Symfony\Component\HttpFoundation\Session\SessionInterface ' )-> getMock ( );
43
43
$ session ->expects ($ this ->once ())->method ('migrate ' )->with ($ this ->equalTo (true ));
44
44
45
45
$ strategy = new SessionAuthenticationStrategy (SessionAuthenticationStrategy::MIGRATE );
@@ -48,7 +48,7 @@ public function testSessionIsMigrated()
48
48
49
49
public function testSessionIsInvalidated ()
50
50
{
51
- $ session = $ this ->getMock ('Symfony\Component\HttpFoundation\Session\SessionInterface ' );
51
+ $ session = $ this ->getMockBuilder ('Symfony\Component\HttpFoundation\Session\SessionInterface ' )-> getMock ( );
52
52
$ session ->expects ($ this ->once ())->method ('invalidate ' );
53
53
54
54
$ strategy = new SessionAuthenticationStrategy (SessionAuthenticationStrategy::INVALIDATE );
@@ -57,7 +57,7 @@ public function testSessionIsInvalidated()
57
57
58
58
private function getRequest ($ session = null )
59
59
{
60
- $ request = $ this ->getMock ('Symfony\Component\HttpFoundation\Request ' );
60
+ $ request = $ this ->getMockBuilder ('Symfony\Component\HttpFoundation\Request ' )-> getMock ( );
61
61
62
62
if (null !== $ session ) {
63
63
$ request ->expects ($ this ->any ())->method ('getSession ' )->will ($ this ->returnValue ($ session ));
@@ -68,6 +68,6 @@ private function getRequest($session = null)
68
68
69
69
private function getToken ()
70
70
{
71
- return $ this ->getMock ('Symfony\Component\Security\Core\Authentication\Token\TokenInterface ' );
71
+ return $ this ->getMockBuilder ('Symfony\Component\Security\Core\Authentication\Token\TokenInterface ' )-> getMock ( );
72
72
}
73
73
}
0 commit comments