From 61a0aee144710228ea30afa672adf530623d35d5 Mon Sep 17 00:00:00 2001 From: Razican Date: Tue, 11 Nov 2014 12:36:21 +0200 Subject: Fixed tests Signed-off-by: Razican --- tests/codeigniter/core/URI_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/codeigniter/core/URI_test.php') diff --git a/tests/codeigniter/core/URI_test.php b/tests/codeigniter/core/URI_test.php index b05a385d6..4b1d644e3 100644 --- a/tests/codeigniter/core/URI_test.php +++ b/tests/codeigniter/core/URI_test.php @@ -138,7 +138,7 @@ class URI_test extends CI_TestCase { $str = $this->uri->filter_uri('$destroy_app(foo)'); - $this->assertEquals($str, '$destroy_app(foo)'); + $this->assertEquals($str, '$destroy_app(foo)'); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From bfa233f559a50ee0674a209fa56f866edc814fd9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Dec 2014 12:00:11 +0200 Subject: Further changes related to issue #47, PR #3323 - Removed a test that was created specifically for the 'convert programmatic characters to entities' feature. - Changed filter_uri() to accept by reference and to not return anything as its only purpose now is to trigger a show_error() call. - Added changelog messages and updated the upgrade instructions. --- tests/codeigniter/core/URI_test.php | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'tests/codeigniter/core/URI_test.php') diff --git a/tests/codeigniter/core/URI_test.php b/tests/codeigniter/core/URI_test.php index 4b1d644e3..adb62f6cb 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, '$destroy_app(foo)'); + $str = 'abc01239~%.:_-'; + $this->uri->filter_uri($str); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 82358c1f2ce5117a21e90f6ec96400535c5f4eed Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 5 Dec 2014 12:03:42 +0200 Subject: Fix a filter_uri() test --- tests/codeigniter/core/URI_test.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/codeigniter/core/URI_test.php') diff --git a/tests/codeigniter/core/URI_test.php b/tests/codeigniter/core/URI_test.php index adb62f6cb..50663d54a 100644 --- a/tests/codeigniter/core/URI_test.php +++ b/tests/codeigniter/core/URI_test.php @@ -135,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); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b