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 /Tests/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 'Tests/Http')
-rw-r--r-- | Tests/Http/Firewall/UsernamePasswordFormAuthenticationListenerTest.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Tests/Http/Firewall/UsernamePasswordFormAuthenticationListenerTest.php b/Tests/Http/Firewall/UsernamePasswordFormAuthenticationListenerTest.php index eca14d3..22ba421 100644 --- a/Tests/Http/Firewall/UsernamePasswordFormAuthenticationListenerTest.php +++ b/Tests/Http/Firewall/UsernamePasswordFormAuthenticationListenerTest.php @@ -24,16 +24,16 @@ class UsernamePasswordFormAuthenticationListenerTest extends \PHPUnit_Framework_ public function testHandleWhenUsernameLength($username, $ok) { $request = Request::create('/login_check', 'POST', array('_username' => $username)); - $request->setSession($this->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface')); + $request->setSession($this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface')->getMock()); - $httpUtils = $this->getMock('Symfony\Component\Security\Http\HttpUtils'); + $httpUtils = $this->getMockBuilder('Symfony\Component\Security\Http\HttpUtils')->getMock(); $httpUtils ->expects($this->any()) ->method('checkRequestPath') ->will($this->returnValue(true)) ; - $failureHandler = $this->getMock('Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface'); + $failureHandler = $this->getMockBuilder('Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface')->getMock(); $failureHandler ->expects($ok ? $this->never() : $this->once()) ->method('onAuthenticationFailure') @@ -48,17 +48,17 @@ class UsernamePasswordFormAuthenticationListenerTest extends \PHPUnit_Framework_ ; $listener = new UsernamePasswordFormAuthenticationListener( - $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'), + $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(), $authenticationManager, - $this->getMock('Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface'), + $this->getMockBuilder('Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface')->getMock(), $httpUtils, 'TheProviderKey', - $this->getMock('Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface'), + $this->getMockBuilder('Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface')->getMock(), $failureHandler, array('require_previous_session' => false) ); - $event = $this->getMock('Symfony\Component\HttpKernel\Event\GetResponseEvent', array(), array(), '', false); + $event = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')->disableOriginalConstructor()->getMock(); $event ->expects($this->any()) ->method('getRequest') |