From 99bd6570b98397272ea10ab34ec777f9a46ffc8b Mon Sep 17 00:00:00 2001 From: jekkos-t520 Date: Sat, 29 Feb 2020 01:07:04 +0100 Subject: [PATCH] Load testing dotenv if environment is set --- application/config/hooks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/config/hooks.php b/application/config/hooks.php index 37e9d3ccc..dfc36793c 100644 --- a/application/config/hooks.php +++ b/application/config/hooks.php @@ -27,7 +27,7 @@ $hook['post_controller'] = array( ); $hook['pre_system'] = function() { - $config_path = APPPATH . 'config/'; + $config_path = APPPATH . (ENVIRONMENT == 'testing') ? 'tests/' : 'config/'; try { $dotenv = new Dotenv\Dotenv($config_path); $dotenv->overload();