summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/core/URI_test.php
diff options
context:
space:
mode:
authorAhmad Anbar <aanbar@gmail.com>2015-01-11 18:39:06 +0100
committerAhmad Anbar <aanbar@gmail.com>2015-01-11 18:39:06 +0100
commitc8e1de74b139dc7f3e776f7ebf98495ec5b780a6 (patch)
tree51709a1855d570ba495d81a172a029015341c2bd /tests/codeigniter/core/URI_test.php
parentfaa4890addbaa90254ef160813a08f727d069415 (diff)
parent99f31e76bd06876cd3bf789f9d2774f79818b7df (diff)
Merge remote-tracking branch 'upstream/develop' into develop
Diffstat (limited to 'tests/codeigniter/core/URI_test.php')
-rw-r--r--tests/codeigniter/core/URI_test.php23
1 files changed, 5 insertions, 18 deletions
diff --git a/tests/codeigniter/core/URI_test.php b/tests/codeigniter/core/URI_test.php
index b05a385d6..50663d54a 100644
--- a/tests/codeigniter/core/URI_test.php
+++ b/tests/codeigniter/core/URI_test.php
@@ -119,26 +119,12 @@ class URI_test extends CI_TestCase {
*/
// --------------------------------------------------------------------
- public function test_filter_uri()
+ public function test_filter_uri_passing()
{
$this->uri->_set_permitted_uri_chars('a-z 0-9~%.:_\-');
- $str_in = 'abc01239~%.:_-';
- $str = $this->uri->filter_uri($str_in);
-
- $this->assertEquals($str, $str_in);
- }
-
- // --------------------------------------------------------------------
-
- public function test_filter_uri_escaping()
- {
- // ensure escaping even if dodgey characters are permitted
- $this->uri->_set_permitted_uri_chars('a-z 0-9~%.:_\-()$');
-
- $str = $this->uri->filter_uri('$destroy_app(foo)');
-
- $this->assertEquals($str, '&#36;destroy_app&#40;foo&#41;');
+ $str = 'abc01239~%.:_-';
+ $this->uri->filter_uri($str);
}
// --------------------------------------------------------------------
@@ -149,7 +135,8 @@ class URI_test extends CI_TestCase {
$this->uri->config->set_item('enable_query_strings', FALSE);
$this->uri->_set_permitted_uri_chars('a-z 0-9~%.:_\-');
- $this->uri->filter_uri('$this()');
+ $segment = '$this()'; // filter_uri() accepts by reference
+ $this->uri->filter_uri($segment);
}
// --------------------------------------------------------------------