summaryrefslogtreecommitdiffstats
path: root/Http/Tests/Session/SessionAuthenticationStrategyTest.php
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2016-12-19 17:00:11 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2016-12-19 17:00:11 +0100
commitb6686776ba39726bafa6435319ba0b3686e41498 (patch)
tree37f16eabaa449fbe27560a9f916124cf5902f227 /Http/Tests/Session/SessionAuthenticationStrategyTest.php
parenta57c25800dcd39387a9a831ef8f436a6bebb8e72 (diff)
downloadsymfony-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.php8
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();
}
}