summaryrefslogtreecommitdiffstats
path: root/Http/Tests/Session/SessionAuthenticationStrategyTest.php
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2016-12-19 10:02:29 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2016-12-19 16:22:46 +0100
commit0582ad240b9aa4b86945b3fdee0f84b20eb0856f (patch)
treee2eff67cc198e382599df30992fc598c433b9b6e /Http/Tests/Session/SessionAuthenticationStrategyTest.php
parente396644d91c69dd7844f83735832e896e6ed4bf3 (diff)
downloadsymfony-security-0582ad240b9aa4b86945b3fdee0f84b20eb0856f.zip
symfony-security-0582ad240b9aa4b86945b3fdee0f84b20eb0856f.tar.gz
symfony-security-0582ad240b9aa4b86945b3fdee0f84b20eb0856f.tar.bz2
fixed obsolete getMock() usage
Diffstat (limited to 'Http/Tests/Session/SessionAuthenticationStrategyTest.php')
-rw-r--r--Http/Tests/Session/SessionAuthenticationStrategyTest.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/Http/Tests/Session/SessionAuthenticationStrategyTest.php b/Http/Tests/Session/SessionAuthenticationStrategyTest.php
index 4aef4b2..c23821a 100644
--- a/Http/Tests/Session/SessionAuthenticationStrategyTest.php
+++ b/Http/Tests/Session/SessionAuthenticationStrategyTest.php
@@ -43,7 +43,7 @@ class SessionAuthenticationStrategyTest extends \PHPUnit_Framework_TestCase
$this->markTestSkipped('We cannot destroy the old session on PHP 5.4.0 - 5.4.10.');
}
- $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);
@@ -56,7 +56,7 @@ class SessionAuthenticationStrategyTest extends \PHPUnit_Framework_TestCase
$this->markTestSkipped('This PHP version is not affected.');
}
- $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(false));
$strategy = new SessionAuthenticationStrategy(SessionAuthenticationStrategy::MIGRATE);
@@ -65,7 +65,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);
@@ -74,7 +74,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));
@@ -85,6 +85,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();
}
}