summaryrefslogtreecommitdiffstats
path: root/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php
diff options
context:
space:
mode:
authorChristian Flothmann <christian.flothmann@xabbuh.de>2015-04-03 18:13:34 +0200
committerChristian Flothmann <christian.flothmann@xabbuh.de>2015-09-30 09:55:52 +0200
commitd37cee9ea33b5ece6837253a15d83e0740074bba (patch)
tree476021f595a02fa111ccd0b29a38dd61cd14ea6a /Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php
parent889a989997c4b038fb4e354e57e35ede82370581 (diff)
downloadsymfony-security-d37cee9ea33b5ece6837253a15d83e0740074bba.zip
symfony-security-d37cee9ea33b5ece6837253a15d83e0740074bba.tar.gz
symfony-security-d37cee9ea33b5ece6837253a15d83e0740074bba.tar.bz2
deprecate finding deep items in request parameters
Diffstat (limited to 'Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php')
-rw-r--r--Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php b/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php
index 4d1847d..2c22da6 100644
--- a/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php
+++ b/Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php
@@ -68,6 +68,20 @@ class DefaultAuthenticationSuccessHandlerTest extends \PHPUnit_Framework_TestCas
$this->assertSame($response, $result);
}
+ public function testTargetPathIsPassedAsNestedParameterWithRequest()
+ {
+ $this->request->expects($this->once())
+ ->method('get')->with('_target_path')
+ ->will($this->returnValue(array('value' => '/dashboard')));
+
+ $response = $this->expectRedirectResponse('/dashboard');
+
+ $handler = new DefaultAuthenticationSuccessHandler($this->httpUtils, array('target_path_parameter' => '_target_path[value]'));
+ $result = $handler->onAuthenticationSuccess($this->request, $this->token);
+
+ $this->assertSame($response, $result);
+ }
+
public function testTargetPathParameterIsCustomised()
{
$options = array('target_path_parameter' => '_my_target_path');