8 require_once
__DIR__ .
'/../../../../app/bootstrap.php';
9 require_once
__DIR__ .
'/autoload.php';
14 if (!defined(
'TESTS_TEMP_DIR')) {
18 if (!defined(
'INTEGRATION_TESTS_DIR')) {
23 require_once
'deployTestModules.php';
31 if (
$settings->get(
'TESTS_EXTRA_VERBOSE_LOG')) {
32 $filesystem = new \Magento\Framework\Filesystem\Driver\File();
33 $exceptionHandler = new \Magento\Framework\Logger\Handler\Exception(
$filesystem);
35 'system' => new \Magento\Framework\Logger\Handler\System(
$filesystem, $exceptionHandler),
36 'debug' => new \Magento\Framework\Logger\Handler\Debug(
$filesystem)
38 $shell = new \Magento\Framework\Shell(
39 new \
Magento\Framework\Shell\CommandRenderer(),
40 new \Monolog\Logger(
'main', $loggerHandlers)
43 $shell = new \Magento\Framework\Shell(
new \
Magento\Framework\Shell\CommandRenderer());
55 $installDir = TESTS_TEMP_DIR .
"/sandbox-{$settings->get('TESTS_PARALLEL_THREAD', 0)}-{$sandboxUniqueId}";
61 $settings->get(
'TESTS_GLOBAL_CONFIG_DIR'),
63 AutoloaderRegistry::getAutoloader(),
69 new \
Magento\TestFramework\Bootstrap\Environment(),
70 new \
Magento\TestFramework\Bootstrap\DocBlock(
"{$testsBaseDir}/testsuite"),
71 new \
Magento\TestFramework\Bootstrap\Profiler(
new \
Magento\Framework\Profiler\Driver\Standard()),
77 if (
$settings->getAsBoolean(
'TESTS_CLEANUP')) {
88 ->create(\
Magento\Framework\Component\DirSearch::class);
90 ->create(\
Magento\Framework\View\Design\Theme\ThemePackageList::class);
93 new \
Magento\Framework\Component\ComponentRegistrar(),
101 }
catch (\Exception $e) {
112 function ($errNo, $errStr, $errFile, $errLine) {
113 if (error_reporting()) {
116 E_WARNING =>
'Warning',
118 E_NOTICE =>
'Notice',
119 E_CORE_ERROR =>
'Core Error',
120 E_CORE_WARNING =>
'Core Warning',
121 E_COMPILE_ERROR =>
'Compile Error',
122 E_COMPILE_WARNING =>
'Compile Warning',
123 E_USER_ERROR =>
'User Error',
124 E_USER_WARNING =>
'User Warning',
125 E_USER_NOTICE =>
'User Notice',
126 E_STRICT =>
'Strict',
127 E_RECOVERABLE_ERROR =>
'Recoverable Error',
128 E_DEPRECATED =>
'Deprecated',
129 E_USER_DEPRECATED =>
'User Deprecated',
132 $errName = isset($errorNames[$errNo]) ? $errorNames[$errNo] :
"";
134 throw new \PHPUnit\Framework\Exception(
135 sprintf(
"%s: %s in %s:%s.", $errName, $errStr, $errFile, $errLine),
defined('TESTS_BP')||define('TESTS_BP' __DIR__
if(!file_exists($installConfigFile)) if(!defined('TESTS_INSTALLATION_DB_CONFIG_FILE')) $shell
if(defined('TESTS_MAGENTO_INSTALLATION') &&TESTS_MAGENTO_INSTALLATION==='enabled') $bootstrap
if(!file_exists($installConfigFile)) $globalConfigFile
static setInstance(Files $instance=null)
if(!file_exists($globalConfigFile)) $sandboxUniqueId
catch(\Exception $e) setCustomErrorHandler()
static setInstance(\Magento\TestFramework\Helper\Bootstrap $instance)
static getObjectManager()