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();