1
0
mirror of synced 2024-11-24 20:56:03 +03:00

Make .env file unnecessary for tests

This commit is contained in:
Pavel 2019-06-19 11:56:39 +03:00
parent 8b27a5142b
commit d43846d1e3

View File

@ -12,4 +12,9 @@ $loader->add('RetailCrm\\Mg\\Bot\\Test', __DIR__);
use Symfony\Component\Dotenv\Dotenv;
$dotenv = new Dotenv();
$dotenv->load(__DIR__ . '/../.env');
try {
$dotenv->load(__DIR__ . '/../.env');
} catch (Exception $exception) {
echo "WARNING: Can't load .env file. Using default environment.";
}