1
0
mirror of synced 2024-11-22 03:46:02 +03:00
mg-bot-api-client-php/tests/bootstrap.php

25 lines
570 B
PHP
Raw Normal View History

2019-06-10 16:24:22 +03:00
<?php
if (function_exists('date_default_timezone_set')
&& function_exists('date_default_timezone_get')
) {
date_default_timezone_set(date_default_timezone_get());
}
2022-12-22 14:55:13 +03:00
(static function () {
$loader = include dirname(__DIR__) . '/vendor/autoload.php';
$loader->add('RetailCrm\\Mg\\Bot\\Test', __DIR__);
})();
2019-06-10 16:24:22 +03:00
use Symfony\Component\Dotenv\Dotenv;
$dotenv = new Dotenv();
2019-06-19 11:56:39 +03:00
try {
2021-12-13 10:48:18 +03:00
$dotenv->usePutenv(true);
2019-06-19 11:56:39 +03:00
$dotenv->load(__DIR__ . '/../.env');
} catch (Exception $exception) {
echo "WARNING: Can't load .env file. Using default environment.";
}