Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0b7e1f3

Browse files
committed
[Security] made tests work for 2.8 and 3.0
1 parent fdb2073 commit 0b7e1f3

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

src/Symfony/Component/Security/Http/Tests/Authentication/DefaultAuthenticationFailureHandlerTest.php

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,12 @@
1717

1818
class DefaultAuthenticationFailureHandlerTest extends \PHPUnit_Framework_TestCase
1919
{
20-
private $httpKernel = null;
21-
22-
private $httpUtils = null;
23-
24-
private $logger = null;
25-
26-
private $request = null;
27-
28-
private $session = null;
29-
30-
private $exception = null;
20+
private $httpKernel;
21+
private $httpUtils;
22+
private $logger;
23+
private $request;
24+
private $session;
25+
private $exception;
3126

3227
protected function setUp()
3328
{
@@ -145,7 +140,7 @@ public function testFailurePathCanBeOverwritten()
145140
public function testFailurePathCanBeOverwrittenWithRequest()
146141
{
147142
$this->request->expects($this->once())
148-
->method('get')->with('_failure_path', null, false)
143+
->method('get')->with('_failure_path')
149144
->will($this->returnValue('/auth/login'));
150145

151146
$this->httpUtils->expects($this->once())
@@ -158,7 +153,7 @@ public function testFailurePathCanBeOverwrittenWithRequest()
158153
public function testFailurePathCanBeOverwrittenWithNestedAttributeInRequest()
159154
{
160155
$this->request->expects($this->once())
161-
->method('get')->with('_failure_path', null, false)
156+
->method('get')->with('_failure_path')
162157
->will($this->returnValue(array('value' => '/auth/login')));
163158

164159
$this->httpUtils->expects($this->once())
@@ -173,7 +168,7 @@ public function testFailurePathParameterCanBeOverwritten()
173168
$options = array('failure_path_parameter' => '_my_failure_path');
174169

175170
$this->request->expects($this->once())
176-
->method('get')->with('_my_failure_path', null, false)
171+
->method('get')->with('_my_failure_path')
177172
->will($this->returnValue('/auth/login'));
178173

179174
$this->httpUtils->expects($this->once())

0 commit comments

Comments
 (0)