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 | |
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')
-rw-r--r-- | Http/Tests/Firewall/ExceptionListenerTest.php | 2 | ||||
-rw-r--r-- | Http/Tests/Session/SessionAuthenticationStrategyTest.php | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Http/Tests/Firewall/ExceptionListenerTest.php b/Http/Tests/Firewall/ExceptionListenerTest.php index ffa7cd8..c1f31d7 100644 --- a/Http/Tests/Firewall/ExceptionListenerTest.php +++ b/Http/Tests/Firewall/ExceptionListenerTest.php @@ -69,7 +69,7 @@ class ExceptionListenerTest extends \PHPUnit_Framework_TestCase { $event = $this->createEvent(new AuthenticationException()); - $entryPoint = $this->getMock('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface'); + $entryPoint = $this->getMockBuilder('Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface')->getMock(); $entryPoint->expects($this->once())->method('start')->will($this->returnValue('NOT A RESPONSE')); $listener = $this->createExceptionListener(null, null, null, $entryPoint); 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(); } } |