diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2015-09-30 11:18:13 +0200 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2015-09-30 11:18:13 +0200 |
commit | bf2ab7235258e8e35315f080e1a929de7f9517f5 (patch) | |
tree | a9061e0dd48d4fee801a4e36ccec315f4dcff86b /Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php | |
parent | 493704bf17328063a6e566d912e6e063d4c60f8b (diff) | |
parent | d37cee9ea33b5ece6837253a15d83e0740074bba (diff) | |
download | symfony-security-bf2ab7235258e8e35315f080e1a929de7f9517f5.zip symfony-security-bf2ab7235258e8e35315f080e1a929de7f9517f5.tar.gz symfony-security-bf2ab7235258e8e35315f080e1a929de7f9517f5.tar.bz2 |
Merge branch '2.8'
* 2.8:
Remove profiler storages
deprecate finding deep items in request parameters
[CssSelector] updated README
[CssSelector] remove ConverterInterface
[DependencyInjection] improved a comment for reading fluency
[HttpKernel] change a class in tests to avoid depending on SQLite
[FrameworkBundle] Fix tests
[Bridge\Twig] Fix form lowest version
[ci] Display fastest results first when running tests in parallel
[Yaml] Improve newline handling in folded scalar blocks
Diffstat (limited to 'Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php')
-rw-r--r-- | Http/Tests/Authentication/DefaultAuthenticationSuccessHandlerTest.php | 14 |
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'); |