diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2013-03-20 15:03:03 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2013-03-20 15:03:03 +0100 |
commit | ab9e18a00d9da04e7ff5f204ed88bc8307e2bec9 (patch) | |
tree | 1368c15cc2c6da707bf19df3adcdc143fb3d8299 /Tests/Http | |
parent | 47037a7958cd3968161fc08710bc30cad1eba115 (diff) | |
parent | d6e78258d9049f137549718524585e8822b06d95 (diff) | |
download | symfony-security-ab9e18a00d9da04e7ff5f204ed88bc8307e2bec9.zip symfony-security-ab9e18a00d9da04e7ff5f204ed88bc8307e2bec9.tar.gz symfony-security-ab9e18a00d9da04e7ff5f204ed88bc8307e2bec9.tar.bz2 |
Merge branch '2.2'
* 2.2: (70 commits)
change wrapped exception message to be more usefull
updated VERSION for 2.0.23
update CONTRIBUTORS for 2.0.23
updated CHANGELOG for 2.0.23
[Form] fixed failing test
[DomCrawler] added support for query string with slash
Fixed invalid file path for hiddeninput.exe on Windows.
fix xsd definition for strict-requirements
[WebProfilerBundle] Fixed the toolbar styles to apply them in IE8
[ClassLoader] fixed heredocs handling
fixed handling of heredocs
Add a public modifier to an interface method
removing xdebug extension
[HttpRequest] fixes Request::getLanguages() bug
[HttpCache] added a test (cached content should be kept after purging)
[DoctrineBridge] Fixed non-utf-8 recognition
[Security] fixed HttpUtils class tests
replaced new occurences of 'Request::create()' with '::create()'
changed sub-requests creation to '::create()'
fixed merge issue
...
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig
src/Symfony/Component/DomCrawler/Link.php
src/Symfony/Component/Translation/Translator.php
Diffstat (limited to 'Tests/Http')
-rw-r--r-- | Tests/Http/HttpUtilsTest.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Tests/Http/HttpUtilsTest.php b/Tests/Http/HttpUtilsTest.php index fc1b754..bf078da 100644 --- a/Tests/Http/HttpUtilsTest.php +++ b/Tests/Http/HttpUtilsTest.php @@ -137,13 +137,25 @@ class HttpUtilsTest extends \PHPUnit_Framework_TestCase $utils->checkRequestPath($this->getRequest(), 'foobar'); } - private function getUrlGenerator() + public function testGenerateUriRemovesQueryString() + { + $method = new \ReflectionMethod('Symfony\Component\Security\Http\HttpUtils', 'generateUri'); + $method->setAccessible(true); + + $utils = new HttpUtils($this->getUrlGenerator()); + $this->assertEquals('/foo/bar', $method->invoke($utils, new Request(), 'route_name')); + + $utils = new HttpUtils($this->getUrlGenerator('/foo/bar?param=value')); + $this->assertEquals('/foo/bar', $method->invoke($utils, new Request(), 'route_name')); + } + + private function getUrlGenerator($generatedUrl = '/foo/bar') { $urlGenerator = $this->getMock('Symfony\Component\Routing\Generator\UrlGeneratorInterface'); $urlGenerator ->expects($this->any()) ->method('generate') - ->will($this->returnValue('/foo/bar')) + ->will($this->returnValue($generatedUrl)) ; return $urlGenerator; |