Skip to content

Commit

Permalink
minor #16037 [Security] made tests work for 2.8 and 3.0 (fabpot)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.8 branch.

Discussion
----------

[Security] made tests work for 2.8 and 3.0

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Commits
-------

0b7e1f3 [Security] made tests work for 2.8 and 3.0
  • Loading branch information
fabpot committed Oct 1, 2015
2 parents fdb2073 + 0b7e1f3 commit ff6d9c1
Showing 1 changed file with 9 additions and 14 deletions.
Expand Up @@ -17,17 +17,12 @@

class DefaultAuthenticationFailureHandlerTest extends \PHPUnit_Framework_TestCase
{
private $httpKernel = null;

private $httpUtils = null;

private $logger = null;

private $request = null;

private $session = null;

private $exception = null;
private $httpKernel;
private $httpUtils;
private $logger;
private $request;
private $session;
private $exception;

protected function setUp()
{
Expand Down Expand Up @@ -145,7 +140,7 @@ public function testFailurePathCanBeOverwritten()
public function testFailurePathCanBeOverwrittenWithRequest()
{
$this->request->expects($this->once())
->method('get')->with('_failure_path', null, false)
->method('get')->with('_failure_path')
->will($this->returnValue('/auth/login'));

$this->httpUtils->expects($this->once())
Expand All @@ -158,7 +153,7 @@ public function testFailurePathCanBeOverwrittenWithRequest()
public function testFailurePathCanBeOverwrittenWithNestedAttributeInRequest()
{
$this->request->expects($this->once())
->method('get')->with('_failure_path', null, false)
->method('get')->with('_failure_path')
->will($this->returnValue(array('value' => '/auth/login')));

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

$this->request->expects($this->once())
->method('get')->with('_my_failure_path', null, false)
->method('get')->with('_my_failure_path')
->will($this->returnValue('/auth/login'));

$this->httpUtils->expects($this->once())
Expand Down

0 comments on commit ff6d9c1

Please sign in to comment.