diff options
author | Florian Pritz <bluewind@xinu.at> | 2017-09-18 17:31:58 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2017-09-18 17:55:25 +0200 |
commit | 0569ecc413e75ca132d515b75faa8581d9672220 (patch) | |
tree | 64a5fa1c4c113f003cf3f7bd72e25a5472e10f82 /application | |
parent | e866cabfe21fd77d57c8584e01fbd8bb7736f997 (diff) |
Automatically set baseurl for tests
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application')
-rw-r--r-- | application/config/config.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/application/config/config.php b/application/config/config.php index 40212b2f3..8abf1ff6f 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -642,3 +642,7 @@ $config['download_nginx_location'] = '/protected-uploads'; if (file_exists(APPPATH.'config/config-local.php')) { include APPPATH.'config/config-local.php'; } + +if (getenv("ENVIRONMENT") === "testsuite" && isset($_SERVER['SERVER_PORT'])) { + $config['base_url'] = 'http://127.0.0.1:'.$_SERVER['SERVER_PORT'].'/'; +} |