diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2016-12-19 16:38:44 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2016-12-19 16:38:44 +0100 |
commit | b61218eac019add58b6eaf5bd0bdf331fb375ffb (patch) | |
tree | 81d5e0ad1bc52ea5cb4bcc570556e886c29fdc8c /Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php | |
parent | 8a7bf02f6038110dbf43a6c7dbf247acccac9817 (diff) | |
parent | 0582ad240b9aa4b86945b3fdee0f84b20eb0856f (diff) | |
download | symfony-security-b61218eac019add58b6eaf5bd0bdf331fb375ffb.zip symfony-security-b61218eac019add58b6eaf5bd0bdf331fb375ffb.tar.gz symfony-security-b61218eac019add58b6eaf5bd0bdf331fb375ffb.tar.bz2 |
Merge branch '2.7' into 2.8
* 2.7:
fixed obsolete getMock() usage
[WebProfilerBundle] Display multiple HTTP headers in WDT
Diffstat (limited to 'Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php')
-rw-r--r-- | Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php b/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php index c97ee69..cb5fb51 100644 --- a/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php +++ b/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php @@ -27,14 +27,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() @@ -181,8 +181,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; } |