diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2016-12-19 10:02:29 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2016-12-19 16:22:46 +0100 |
commit | 0582ad240b9aa4b86945b3fdee0f84b20eb0856f (patch) | |
tree | e2eff67cc198e382599df30992fc598c433b9b6e /Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php | |
parent | e396644d91c69dd7844f83735832e896e6ed4bf3 (diff) | |
download | symfony-security-0582ad240b9aa4b86945b3fdee0f84b20eb0856f.zip symfony-security-0582ad240b9aa4b86945b3fdee0f84b20eb0856f.tar.gz symfony-security-0582ad240b9aa4b86945b3fdee0f84b20eb0856f.tar.bz2 |
fixed obsolete getMock() usage
Diffstat (limited to 'Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php')
-rw-r--r-- | Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php b/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php index ae9f02b..7166c53 100644 --- a/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php +++ b/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php @@ -24,10 +24,10 @@ class DefaultAuthenticationSuccessHandlerTest extends \PHPUnit_Framework_TestCas protected function setUp() { - $this->httpUtils = $this->getMock('Symfony\Component\Security\Http\HttpUtils'); - $this->request = $this->getMock('Symfony\Component\HttpFoundation\Request'); - $this->request->headers = $this->getMock('Symfony\Component\HttpFoundation\HeaderBag'); - $this->token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); + $this->httpUtils = $this->getMockBuilder('Symfony\Component\Security\Http\HttpUtils')->getMock(); + $this->request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->getMock(); + $this->request->headers = $this->getMockBuilder('Symfony\Component\HttpFoundation\HeaderBag')->getMock(); + $this->token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); } public function testRequestIsRedirected() @@ -87,7 +87,7 @@ class DefaultAuthenticationSuccessHandlerTest extends \PHPUnit_Framework_TestCas public function testTargetPathIsTakenFromTheSession() { - $session = $this->getMock('Symfony\Component\HttpFoundation\Session\SessionInterface'); + $session = $this->getMockBuilder('Symfony\Component\HttpFoundation\Session\SessionInterface')->getMock(); $session->expects($this->once()) ->method('get')->with('_security.admin.target_path') ->will($this->returnValue('/admin/dashboard')); |