summaryrefslogtreecommitdiff
path: root/modules/gallery_unit_test/controllers/gallery_unit_test.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-06-10 00:53:16 -0700
committerBharat Mediratta <bharat@menalto.com>2009-06-10 00:53:16 -0700
commit0157ed4cfe19e7a1721cbf3bf0b09db47795371f (patch)
tree173838b675d218c7ec365da08d2ef0a4db65b164 /modules/gallery_unit_test/controllers/gallery_unit_test.php
parentfc64a55f2e6d2e3f16e0806e6672f7d8c8de42a7 (diff)
Update test code to match the change made in 47810c9aec1e6b190a1a90505899669a2c89b770
where we adjust the site_domain in config.php
Diffstat (limited to 'modules/gallery_unit_test/controllers/gallery_unit_test.php')
-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)) {