summaryrefslogtreecommitdiffstats
path: root/Http/Tests/Authentication/SimpleAuthenticationHandlerTest.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/Authentication/SimpleAuthenticationHandlerTest.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/Authentication/SimpleAuthenticationHandlerTest.php')
-rw-r--r--Http/Tests/Authentication/SimpleAuthenticationHandlerTest.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/Http/Tests/Authentication/SimpleAuthenticationHandlerTest.php b/Http/Tests/Authentication/SimpleAuthenticationHandlerTest.php
index 8a31886..330b21a 100644
--- a/Http/Tests/Authentication/SimpleAuthenticationHandlerTest.php
+++ b/Http/Tests/Authentication/SimpleAuthenticationHandlerTest.php
@@ -34,11 +34,11 @@ class SimpleAuthenticationHandlerTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
- $this->successHandler = $this->getMock('Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface');
- $this->failureHandler = $this->getMock('Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface');
+ $this->successHandler = $this->getMockBuilder('Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface')->getMock();
+ $this->failureHandler = $this->getMockBuilder('Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface')->getMock();
- $this->request = $this->getMock('Symfony\Component\HttpFoundation\Request');
- $this->token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface');
+ $this->request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock();
+ $this->token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock();
// No methods are invoked on the exception; we just assert on its class
$this->authenticationException = new AuthenticationException();
@@ -47,7 +47,7 @@ class SimpleAuthenticationHandlerTest extends \PHPUnit_Framework_TestCase
public function testOnAuthenticationSuccessFallsBackToDefaultHandlerIfSimpleIsNotASuccessHandler()
{
- $authenticator = $this->getMock('Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface');
+ $authenticator = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface')->getMock();
$this->successHandler->expects($this->once())
->method('onAuthenticationSuccess')
@@ -117,7 +117,7 @@ class SimpleAuthenticationHandlerTest extends \PHPUnit_Framework_TestCase
public function testOnAuthenticationFailureFallsBackToDefaultHandlerIfSimpleIsNotAFailureHandler()
{
- $authenticator = $this->getMock('Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface');
+ $authenticator = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface')->getMock();
$this->failureHandler->expects($this->once())
->method('onAuthenticationFailure')