summaryrefslogtreecommitdiffstats
path: root/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.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/DefaultAuthenticationFailureHandlerTest.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/DefaultAuthenticationFailureHandlerTest.php')
-rw-r--r--Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php b/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php
index 252b124..da30aa9 100644
--- a/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php
+++ b/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php
@@ -32,14 +32,14 @@ class DefaultAuthenticationFailureHandlerTest extends \PHPUnit_Framework_TestCas
protected function setUp()
{
- $this->httpKernel = $this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface');
- $this->httpUtils = $this->getMock('Symfony\Component\Security\Http\HttpUtils');
- $this->logger = $this->getMock('Psr\Log\LoggerInterface');
+ $this->httpKernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock();
+ $this->httpUtils = $this->getMockBuilder('Symfony\Component\Security\Http\HttpUtils')->getMock();
+ $this->logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock();
- $this->session = $this->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface');
- $this->request = $this->getMock('Symfony\Component\HttpFoundation\Request');
+ $this->session = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface')->getMock();
+ $this->request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock();
$this->request->expects($this->any())->method('getSession')->will($this->returnValue($this->session));
- $this->exception = $this->getMock('Symfony\Component\Security\Core\Exception\AuthenticationException', array('getMessage'));
+ $this->exception = $this->getMockBuilder('Symfony\Component\Security\Core\Exception\AuthenticationException')->setMethods(array('getMessage'))->getMock();
}
public function testForward()
@@ -173,8 +173,8 @@ class DefaultAuthenticationFailureHandlerTest extends \PHPUnit_Framework_TestCas
private function getRequest()
{
- $request = $this->getMock('Symfony\Component\HttpFoundation\Request');
- $request->attributes = $this->getMock('Symfony\Component\HttpFoundation\ParameterBag');
+ $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock();
+ $request->attributes = $this->getMockBuilder('Symfony\Component\HttpFoundation\ParameterBag')->getMock();
return $request;
}