From 3f65f3447d1255284ffb34f7e91dc961389b42e8 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 19 Aug 2014 12:39:53 +0200 Subject: [PATCH] Web\UrlTest: test should use %20 instead of + We MUST use rawurlencode everywhere to avoid potential conflicts with URLs created on JS side. refs #6604 --- test/php/library/Icinga/Web/UrlTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/php/library/Icinga/Web/UrlTest.php b/test/php/library/Icinga/Web/UrlTest.php index 0eff54e5c..183f33369 100644 --- a/test/php/library/Icinga/Web/UrlTest.php +++ b/test/php/library/Icinga/Web/UrlTest.php @@ -21,7 +21,7 @@ class UrlTest extends BaseTestCase $url = Url::fromRequest(); $this->assertEquals( '/path/to/my/test/url.html?param1=value1&param2=value2', - $url->getAbsoluteUrl(), + $url->getAbsoluteUrl('&'), 'Url::fromRequest does not reassemble the correct url from the global request' ); } @@ -119,7 +119,7 @@ class UrlTest extends BaseTestCase */ public function testWhetherFromPathProperlyRecognizesAndDecodesQueryParameters() { - $url = Url::fromPath('/my/test/url.html?param1=%25arg1¶m2=arg+2' + $url = Url::fromPath('/my/test/url.html?param1=%25arg1¶m2=arg%202' . '¶m3[]=1¶m3[]=2¶m3[]=3¶m4[key1]=val1¶m4[key2]=val2'); $this->assertEquals(