mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-28 19:10:11 -04:00
Load testing dotenv if environment is set
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user