summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/core
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codeigniter/core')
-rw-r--r--tests/codeigniter/core/Config_test.php11
-rw-r--r--tests/codeigniter/core/Security_test.php2
-rw-r--r--tests/codeigniter/core/URI_test.php2
3 files changed, 10 insertions, 5 deletions
diff --git a/tests/codeigniter/core/Config_test.php b/tests/codeigniter/core/Config_test.php
index 2c28a639c..8e312e361 100644
--- a/tests/codeigniter/core/Config_test.php
+++ b/tests/codeigniter/core/Config_test.php
@@ -76,7 +76,8 @@ class Config_test extends CI_TestCase {
// Capture server vars
$old_host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : NULL;
- $old_script = isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : NULL;
+ $old_script_name = isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : NULL;
+ $old_script_filename = $_SERVER['SCRIPT_FILENAME'];
$old_https = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : NULL;
// Setup server vars for detection
@@ -85,6 +86,7 @@ class Config_test extends CI_TestCase {
$script = 'base_test.php';
$_SERVER['HTTP_HOST'] = $host;
$_SERVER['SCRIPT_NAME'] = $path.$script;
+ $_SERVER['SCRIPT_FILENAME'] = '/foo/bar/'.$script;
// Rerun constructor
$this->config = new $cls;
@@ -95,6 +97,7 @@ class Config_test extends CI_TestCase {
// Rerun constructor
$path = '/path/';
$_SERVER['SCRIPT_NAME'] = $path.$script;
+ $_SERVER['SCRIPT_FILENAME'] = '/foo/bar/'.$path.$script;
$this->config = new $cls;
// Test plain detected (subfolder)
@@ -110,10 +113,12 @@ class Config_test extends CI_TestCase {
// Restore server vars
if ($old_host === NULL) unset($_SERVER['HTTP_HOST']);
else $_SERVER['HTTP_HOST'] = $old_host;
- if ($old_script === NULL) unset($_SERVER['SCRIPT_NAME']);
- else $_SERVER['SCRIPT_NAME'] = $old_script;
+ if ($old_script_name === NULL) unset($_SERVER['SCRIPT_NAME']);
+ else $_SERVER['SCRIPT_NAME'] = $old_script_name;
if ($old_https === NULL) unset($_SERVER['HTTPS']);
else $_SERVER['HTTPS'] = $old_https;
+
+ $_SERVER['SCRIPT_FILENAME'] = $old_script_filename;
}
// --------------------------------------------------------------------
diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php
index c80c3d65a..402422ff8 100644
--- a/tests/codeigniter/core/Security_test.php
+++ b/tests/codeigniter/core/Security_test.php
@@ -98,7 +98,7 @@ class Security_test extends CI_TestCase {
$this->assertEquals('<div>Hello <b>Booya</b></div>', $decoded);
- // Issue #3057 (https://github.com/EllisLab/CodeIgniter/issues/3057)
+ // Issue #3057 (https://github.com/bcit-ci/CodeIgniter/issues/3057)
$this->assertEquals(
'&foo should not include a semicolon',
$this->security->entity_decode('&foo should not include a semicolon')
diff --git a/tests/codeigniter/core/URI_test.php b/tests/codeigniter/core/URI_test.php
index 6589c1f5a..b05a385d6 100644
--- a/tests/codeigniter/core/URI_test.php
+++ b/tests/codeigniter/core/URI_test.php
@@ -11,7 +11,7 @@ class URI_test extends CI_TestCase {
/* As of the following commit, _set_uri_string() is a protected method:
- https://github.com/EllisLab/CodeIgniter/commit/d461934184d95b0cfb2feec93f27b621ef72a5c2
+ https://github.com/bcit-ci/CodeIgniter/commit/d461934184d95b0cfb2feec93f27b621ef72a5c2
public function test_set_uri_string()
{