diff options
author | Andrey Andreev <narf@devilix.net> | 2014-04-01 10:49:44 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-04-01 10:49:44 +0200 |
commit | b749fab66f46176f54ea84b89ca5f5bac3b517a4 (patch) | |
tree | 0d929cc7983146a13dd9db8cf4b67bc7a1e23afa /tests | |
parent | 0a002014c2099602cb7143eca850b0acbe898d2f (diff) | |
parent | 7ead65b5dc48c477dc3dfe3b969b1e14bb9a1b79 (diff) |
Merge pull request #2981 from vlakoff/base_url
Work on determination of "base_url" config item
Diffstat (limited to 'tests')
-rw-r--r-- | tests/codeigniter/core/Config_test.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/codeigniter/core/Config_test.php b/tests/codeigniter/core/Config_test.php index 6a0a7a35f..2c28a639c 100644 --- a/tests/codeigniter/core/Config_test.php +++ b/tests/codeigniter/core/Config_test.php @@ -81,7 +81,7 @@ class Config_test extends CI_TestCase { // Setup server vars for detection $host = 'test.com'; - $path = '/path/'; + $path = '/'; $script = 'base_test.php'; $_SERVER['HTTP_HOST'] = $host; $_SERVER['SCRIPT_NAME'] = $path.$script; @@ -89,7 +89,15 @@ class Config_test extends CI_TestCase { // Rerun constructor $this->config = new $cls; - // Test plain detected + // Test plain detected (root) + $this->assertEquals('http://'.$host.$path, $this->config->base_url()); + + // Rerun constructor + $path = '/path/'; + $_SERVER['SCRIPT_NAME'] = $path.$script; + $this->config = new $cls; + + // Test plain detected (subfolder) $this->assertEquals('http://'.$host.$path, $this->config->base_url()); // Rerun constructor |