1
0
mirror of synced 2024-11-22 13:26:10 +03:00
bitrix-module/tests/phpunit/bootstrap.php

32 lines
762 B
PHP
Raw Normal View History

2019-02-28 14:45:39 +03:00
<?php
/**
* PHP version 7.0
*
* @category Integration
* @author RetailCRM <integration@retailcrm.ru>
* @license http://retailcrm.ru Proprietary
* @link http://retailcrm.ru
* @see http://help.retailcrm.ru
*/
$dotenv = Dotenv\Dotenv::create(__DIR__ . '/../../');
$dotenv->load();
2019-02-28 15:11:49 +03:00
if (getenv('TRAVIS_BUILD_DIR')) {
$_SERVER['DOCUMENT_ROOT'] = getenv('TRAVIS_BUILD_DIR') . '/bitrix';
} else {
2019-02-28 14:45:39 +03:00
$_SERVER['DOCUMENT_ROOT'] = getenv('BITRIX_PATH');
2019-02-28 15:11:49 +03:00
}
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);
if (!CModule::IncludeModule('intaro.retailcrm')) {
RegisterModule('intaro.retailcrm');
}