From 0569ecc413e75ca132d515b75faa8581d9672220 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 18 Sep 2017 17:31:58 +0200 Subject: Automatically set baseurl for tests Signed-off-by: Florian Pritz --- application/config/config.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'application/config') 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'].'/'; +} -- cgit v1.2.3-24-g4f1b