2020-01-22 17:12:56 +00:00
|
|
|
<?php
|
|
|
|
|
2020-04-08 12:07:44 +01:00
|
|
|
use AspectMock\Kernel;
|
|
|
|
|
2020-01-28 16:24:51 +00:00
|
|
|
error_reporting(E_ALL);
|
|
|
|
|
2020-04-08 12:07:44 +01:00
|
|
|
$kernel = Kernel::getInstance();
|
|
|
|
$kernel->init([
|
|
|
|
'appDir' => __DIR__ . '/../..',
|
|
|
|
'cacheDir' => __DIR__ . '/../../cache/test/aop',
|
|
|
|
'debug' => true,
|
|
|
|
'includePaths' => [
|
2021-03-24 13:17:48 +00:00
|
|
|
__DIR__ . '/../../core/backend',
|
2020-04-13 12:37:22 +01:00
|
|
|
__DIR__ . '/../../vendor/api-platform',
|
2020-04-08 12:07:44 +01:00
|
|
|
],
|
|
|
|
'excludePaths' => [
|
|
|
|
__DIR__,
|
|
|
|
__DIR__ . '/..',
|
|
|
|
],
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
2020-01-28 16:24:51 +00:00
|
|
|
// Bootstrap composer
|
|
|
|
require_once __DIR__ . '/../../vendor/autoload.php';
|
2020-01-22 17:12:56 +00:00
|
|
|
|
2021-01-11 10:21:18 +00:00
|
|
|
chdir(__DIR__ . '/../../public/legacy');
|
2020-01-28 16:24:51 +00:00
|
|
|
|
|
|
|
// Bootstrap SuiteCRM
|
2020-01-22 17:12:56 +00:00
|
|
|
if (!defined('sugarEntry')) {
|
|
|
|
define('sugarEntry', true);
|
2020-01-28 16:24:51 +00:00
|
|
|
define('SUITE_PHPUNIT_RUNNER', true);
|
2020-01-22 17:12:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Load in legacy
|
2021-01-11 10:21:18 +00:00
|
|
|
require_once __DIR__ . '/../../public/legacy/include/utils.php';
|
|
|
|
require_once __DIR__ . '/../../public/legacy/include/modules.php';
|
|
|
|
require_once __DIR__ . '/../../public/legacy/include/MVC/preDispatch.php';
|
|
|
|
require_once __DIR__ . '/../../public/legacy/include/entryPoint.php';
|
2020-10-30 12:00:08 +00:00
|
|
|
|
|
|
|
$kernel->loadFile(__DIR__ . '/../_mock/Helpers/core/legacy/Data/DBQueryResultsMocking.php');
|
|
|
|
$kernel->loadPhpFiles(__DIR__ . '/../_mock/Mock');
|