2014-11-06 02:44:52 +03:00
|
|
|
<?php
|
|
|
|
|
2021-06-02 17:00:32 +03:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
use Doctrine\Common\Annotations\AnnotationRegistry;
|
|
|
|
|
|
|
|
if (
|
|
|
|
function_exists('date_default_timezone_set')
|
2018-01-10 11:35:57 +03:00
|
|
|
&& function_exists('date_default_timezone_get')
|
|
|
|
) {
|
2018-02-20 17:50:45 +03:00
|
|
|
date_default_timezone_set(date_default_timezone_get());
|
2018-01-10 11:35:57 +03:00
|
|
|
}
|
|
|
|
|
2021-06-02 17:00:32 +03:00
|
|
|
if (!is_file($autoloadFile = __DIR__ . '/../vendor/autoload.php')) {
|
|
|
|
throw new RuntimeException('Did not find vendor/autoload.php. Did you run "composer install --dev"?');
|
|
|
|
}
|
|
|
|
|
|
|
|
$loader = require $autoloadFile;
|
|
|
|
$loader->add('RetailCrm\\TestUtils', __DIR__ . '/tests/utils');
|
|
|
|
$loader->add('RetailCrm\\Tests', __DIR__ . '/src');
|
|
|
|
AnnotationRegistry::registerLoader('class_exists');
|
|
|
|
|
|
|
|
if (file_exists(__DIR__ . '/../.env')) {
|
|
|
|
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/..');
|
|
|
|
$dotenv->load();
|
|
|
|
}
|