[Security] made tests work for 2.8 and 3.0
This commit is contained in:
parent
fdb2073253
commit
0b7e1f3e4d
@ -17,17 +17,12 @@ use Symfony\Component\HttpKernel\HttpKernelInterface;
|
|||||||
|
|
||||||
class DefaultAuthenticationFailureHandlerTest extends \PHPUnit_Framework_TestCase
|
class DefaultAuthenticationFailureHandlerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
private $httpKernel = null;
|
private $httpKernel;
|
||||||
|
private $httpUtils;
|
||||||
private $httpUtils = null;
|
private $logger;
|
||||||
|
private $request;
|
||||||
private $logger = null;
|
private $session;
|
||||||
|
private $exception;
|
||||||
private $request = null;
|
|
||||||
|
|
||||||
private $session = null;
|
|
||||||
|
|
||||||
private $exception = null;
|
|
||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
@ -145,7 +140,7 @@ class DefaultAuthenticationFailureHandlerTest extends \PHPUnit_Framework_TestCas
|
|||||||
public function testFailurePathCanBeOverwrittenWithRequest()
|
public function testFailurePathCanBeOverwrittenWithRequest()
|
||||||
{
|
{
|
||||||
$this->request->expects($this->once())
|
$this->request->expects($this->once())
|
||||||
->method('get')->with('_failure_path', null, false)
|
->method('get')->with('_failure_path')
|
||||||
->will($this->returnValue('/auth/login'));
|
->will($this->returnValue('/auth/login'));
|
||||||
|
|
||||||
$this->httpUtils->expects($this->once())
|
$this->httpUtils->expects($this->once())
|
||||||
@ -158,7 +153,7 @@ class DefaultAuthenticationFailureHandlerTest extends \PHPUnit_Framework_TestCas
|
|||||||
public function testFailurePathCanBeOverwrittenWithNestedAttributeInRequest()
|
public function testFailurePathCanBeOverwrittenWithNestedAttributeInRequest()
|
||||||
{
|
{
|
||||||
$this->request->expects($this->once())
|
$this->request->expects($this->once())
|
||||||
->method('get')->with('_failure_path', null, false)
|
->method('get')->with('_failure_path')
|
||||||
->will($this->returnValue(array('value' => '/auth/login')));
|
->will($this->returnValue(array('value' => '/auth/login')));
|
||||||
|
|
||||||
$this->httpUtils->expects($this->once())
|
$this->httpUtils->expects($this->once())
|
||||||
@ -173,7 +168,7 @@ class DefaultAuthenticationFailureHandlerTest extends \PHPUnit_Framework_TestCas
|
|||||||
$options = array('failure_path_parameter' => '_my_failure_path');
|
$options = array('failure_path_parameter' => '_my_failure_path');
|
||||||
|
|
||||||
$this->request->expects($this->once())
|
$this->request->expects($this->once())
|
||||||
->method('get')->with('_my_failure_path', null, false)
|
->method('get')->with('_my_failure_path')
|
||||||
->will($this->returnValue('/auth/login'));
|
->will($this->returnValue('/auth/login'));
|
||||||
|
|
||||||
$this->httpUtils->expects($this->once())
|
$this->httpUtils->expects($this->once())
|
||||||
|
Reference in New Issue
Block a user