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/EntryPoint/FormAuthenticationEntryPointTest.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/EntryPoint/FormAuthenticationEntryPointTest.php')
-rw-r--r-- | Http/Tests/EntryPoint/FormAuthenticationEntryPointTest.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Http/Tests/EntryPoint/FormAuthenticationEntryPointTest.php b/Http/Tests/EntryPoint/FormAuthenticationEntryPointTest.php index 75a6be4..0247e5f 100644 --- a/Http/Tests/EntryPoint/FormAuthenticationEntryPointTest.php +++ b/Http/Tests/EntryPoint/FormAuthenticationEntryPointTest.php @@ -19,11 +19,11 @@ class FormAuthenticationEntryPointTest extends \PHPUnit_Framework_TestCase { public function testStart() { - $request = $this->getMock('Symfony\Component\HttpFoundation\Request', array(), array(), '', false, false); + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->disableOriginalConstructor()->disableOriginalClone()->getMock(); $response = new Response(); - $httpKernel = $this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); - $httpUtils = $this->getMock('Symfony\Component\Security\Http\HttpUtils'); + $httpKernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $httpUtils = $this->getMockBuilder('Symfony\Component\Security\Http\HttpUtils')->getMock(); $httpUtils ->expects($this->once()) ->method('createRedirectResponse') @@ -38,11 +38,11 @@ class FormAuthenticationEntryPointTest extends \PHPUnit_Framework_TestCase public function testStartWithUseForward() { - $request = $this->getMock('Symfony\Component\HttpFoundation\Request', array(), array(), '', false, false); - $subRequest = $this->getMock('Symfony\Component\HttpFoundation\Request', array(), array(), '', false, false); + $request = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->disableOriginalConstructor()->disableOriginalClone()->getMock(); + $subRequest = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request')->disableOriginalConstructor()->disableOriginalClone()->getMock(); $response = new Response('', 200); - $httpUtils = $this->getMock('Symfony\Component\Security\Http\HttpUtils'); + $httpUtils = $this->getMockBuilder('Symfony\Component\Security\Http\HttpUtils')->getMock(); $httpUtils ->expects($this->once()) ->method('createRequest') @@ -50,7 +50,7 @@ class FormAuthenticationEntryPointTest extends \PHPUnit_Framework_TestCase ->will($this->returnValue($subRequest)) ; - $httpKernel = $this->getMock('Symfony\Component\HttpKernel\HttpKernelInterface'); + $httpKernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); $httpKernel ->expects($this->once()) ->method('handle') |