Load testing dotenv if environment is set

This commit is contained in:
jekkos-t520
2020-02-29 01:07:04 +01:00
committed by jekkos
parent 2110692664
commit 99bd6570b9

View File

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