summaryrefslogtreecommitdiff
path: root/modules/gallery_unit_test
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-06-10 07:42:00 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-06-10 07:42:00 -0700
commita3c9104568704b5e626c9ac9b95921c8a67ef79a (patch)
tree23be8f92ec3119c9fbc37eea5629fa8f5c11f1d2 /modules/gallery_unit_test
parent1f1cb01a967b508374ec9202815cb190bf4ea463 (diff)
parent66014819b4e7fd8a5438eb800675641f7d213e27 (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery_unit_test')
-rw-r--r--modules/gallery_unit_test/controllers/gallery_unit_test.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/gallery_unit_test/controllers/gallery_unit_test.php b/modules/gallery_unit_test/controllers/gallery_unit_test.php
index 56220a19..8f3353dc 100644
--- a/modules/gallery_unit_test/controllers/gallery_unit_test.php
+++ b/modules/gallery_unit_test/controllers/gallery_unit_test.php
@@ -23,6 +23,13 @@ class Gallery_Unit_Test_Controller extends Controller {
print Kohana::show_404();
}
+ // Jump through some hoops to satisfy the way that we check for the site_domain in
+ // config.php. We structure this such that the code in config will leave us with a
+ // site_domain of "." (for historical reasons)
+ // @todo: for tests, we should force the site_domain to something like example.com
+ $_SERVER["SCRIPT_FILENAME"] = "index.php";
+ $_SERVER["SCRIPT_NAME"] = "./index.php";
+
$original_config = DOCROOT . "var/database.php";
$test_config = VARPATH . "database.php";
if (!file_exists($original_config)) {