diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2016-12-19 17:00:11 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2016-12-19 17:00:11 +0100 |
commit | b6686776ba39726bafa6435319ba0b3686e41498 (patch) | |
tree | 37f16eabaa449fbe27560a9f916124cf5902f227 /Http/Tests/Session/SessionAuthenticationStrategyTest.php | |
parent | a57c25800dcd39387a9a831ef8f436a6bebb8e72 (diff) | |
download | symfony-security-b6686776ba39726bafa6435319ba0b3686e41498.zip symfony-security-b6686776ba39726bafa6435319ba0b3686e41498.tar.gz symfony-security-b6686776ba39726bafa6435319ba0b3686e41498.tar.bz2 |
fixed obsolete getMock() usage
Diffstat (limited to 'Http/Tests/Session/SessionAuthenticationStrategyTest.php')
-rw-r--r-- | Http/Tests/Session/SessionAuthenticationStrategyTest.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Http/Tests/Session/SessionAuthenticationStrategyTest.php b/Http/Tests/Session/SessionAuthenticationStrategyTest.php index a1f960f..2d54074 100644 --- a/Http/Tests/Session/SessionAuthenticationStrategyTest.php +++ b/Http/Tests/Session/SessionAuthenticationStrategyTest.php @@ -39,7 +39,7 @@ class SessionAuthenticationStrategyTest extends \PHPUnit_Framework_TestCase public function testSessionIsMigrated() { - $session = $this->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface'); + $session = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface')->getMock(); $session->expects($this->once())->method('migrate')->with($this->equalTo(true)); $strategy = new SessionAuthenticationStrategy(SessionAuthenticationStrategy::MIGRATE); @@ -48,7 +48,7 @@ class SessionAuthenticationStrategyTest extends \PHPUnit_Framework_TestCase public function testSessionIsInvalidated() { - $session = $this->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface'); + $session = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface')->getMock(); $session->expects($this->once())->method('invalidate'); $strategy = new SessionAuthenticationStrategy(SessionAuthenticationStrategy::INVALIDATE); @@ -57,7 +57,7 @@ class SessionAuthenticationStrategyTest extends \PHPUnit_Framework_TestCase private function getRequest($session = null) { - $request = $this->getMock('Symfony\Component\HttpFoundation\Request'); + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); if (null !== $session) { $request->expects($this->any())->method('getSession')->will($this->returnValue($session)); @@ -68,6 +68,6 @@ class SessionAuthenticationStrategyTest extends \PHPUnit_Framework_TestCase private function getToken() { - return $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); + return $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); } } |