summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-01-16 13:41:46 +0100
committerAndrey Andreev <narf@devilix.net>2014-01-16 13:41:46 +0100
commit30d5324617ae136c7a91badb6ed8f7de418fd7f5 (patch)
tree8b9aec18db0c764313d58a42144fb97c7f8526cf /tests
parent08fef7de41cb06785cdb1024769892d9510e6e6b (diff)
URI Routing overhaul
- Allow multiple levels of controller directories (supersedes PRs #390, #2439) - Add support for per-directory 'defaul_controller' and '404_override' (resolves issue #2611; supersedes PR #939) - Fixed a bug where default_controller was called instead of triggering 404 if the current route is inside a directory - Removed a few calls from CI_Router to CI_URI that made a necessity for otherwise internal CI_URI methods to be public: - Removed CI_URI::_fetch_uri_string() and moved its logic into CI_URI::__construct() - Removed CI_URI::_remove_url_suffix, CI_URI::_explode_segments() and moved their logic into CI_URI::_set_uri_string() - Removed CI_URI::_reindex_segments() altogether ( doesn't need further manipulation, while is public anyway and can be properly (and more effectively) replaced on the spot)
Diffstat (limited to 'tests')
-rw-r--r--tests/codeigniter/core/URI_test.php28
1 files changed, 10 insertions, 18 deletions
diff --git a/tests/codeigniter/core/URI_test.php b/tests/codeigniter/core/URI_test.php
index 99d79bbd2..6589c1f5a 100644
--- a/tests/codeigniter/core/URI_test.php
+++ b/tests/codeigniter/core/URI_test.php
@@ -26,6 +26,10 @@ class URI_test extends CI_TestCase {
// --------------------------------------------------------------------
+ /*
+
+ This has been moved to the constructor
+
public function test_fetch_uri_string()
{
define('SELF', 'index.php');
@@ -86,9 +90,14 @@ class URI_test extends CI_TestCase {
// uri_protocol: REQUEST_URI
// uri_protocol: CLI
}
+ */
// --------------------------------------------------------------------
+ /*
+
+ This has been moved into _set_uri_string()
+
public function test_explode_segments()
{
// Let's test the function's ability to clean up this mess
@@ -107,7 +116,7 @@ class URI_test extends CI_TestCase {
$this->assertEquals($a, $this->uri->segments);
}
}
-
+ */
// --------------------------------------------------------------------
public function test_filter_uri()
@@ -145,23 +154,6 @@ class URI_test extends CI_TestCase {
// --------------------------------------------------------------------
- public function test_remove_url_suffix()
- {
- $this->uri->config->set_item('url_suffix', '.html');
-
- $this->uri->uri_string = 'controller/method/index.html';
- $this->uri->_remove_url_suffix();
-
- $this->assertEquals($this->uri->uri_string, 'controller/method/index');
-
- $this->uri->uri_string = 'controller/method/index.htmlify.html';
- $this->uri->_remove_url_suffix();
-
- $this->assertEquals($this->uri->uri_string, 'controller/method/index.htmlify');
- }
-
- // --------------------------------------------------------------------
-
public function test_segment()
{
$this->uri->segments = array(1 => 'controller');