2019-02-28 14:45:39 +03:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* PHP version 7.0
|
|
|
|
*
|
|
|
|
* @category Integration
|
|
|
|
*/
|
|
|
|
|
2020-03-23 15:12:07 +03:00
|
|
|
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
|
|
|
|
require_once __DIR__ . '/../vendor/autoload.php';
|
2019-02-28 15:42:04 +03:00
|
|
|
}
|
2019-02-28 14:45:39 +03:00
|
|
|
|
2020-03-23 15:12:07 +03:00
|
|
|
if (file_exists(__DIR__ . '/../.env')) {
|
|
|
|
$dotenv = Dotenv\Dotenv::create(__DIR__ . '/../');
|
|
|
|
$dotenv->load();
|
2019-02-28 15:11:49 +03:00
|
|
|
}
|
2019-02-28 14:45:39 +03:00
|
|
|
|
2020-03-23 15:12:07 +03:00
|
|
|
$_SERVER['DOCUMENT_ROOT'] = getenv('BITRIX_PATH') ? getenv('BITRIX_PATH') : '/var/www/html';
|
|
|
|
|
2019-02-28 14:45:39 +03:00
|
|
|
define('NOT_CHECK_PERMISSIONS', true);
|
|
|
|
define('NO_AGENT_CHECK', true);
|
|
|
|
|
|
|
|
require($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_before.php');
|
|
|
|
|
|
|
|
global $USER;
|
|
|
|
$USER->Authorize(1);
|
|
|
|
|
2020-03-23 15:12:07 +03:00
|
|
|
if (!IsModuleInstalled('intaro.retailcrm')) {
|
2019-02-28 14:45:39 +03:00
|
|
|
RegisterModule('intaro.retailcrm');
|
|
|
|
}
|
2020-03-23 15:12:07 +03:00
|
|
|
|
2020-09-25 12:31:45 +03:00
|
|
|
COption::SetOptionString('intaro.retailcrm', 'api_version', 'v5');
|
2020-03-23 15:12:07 +03:00
|
|
|
CModule::IncludeModule('intaro.retailcrm');
|
2020-09-25 12:31:45 +03:00
|
|
|
|
|
|
|
require_once 'BitrixTestCase.php';
|