10 require_once
__DIR__ .
'/../../../../app/bootstrap.php';
11 require_once
__DIR__ .
'/autoload.php';
17 if (!defined(
'TESTS_TEMP_DIR')) {
21 if (!defined(
'INTEGRATION_TESTS_DIR')) {
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());
47 require_once INTEGRATION_TESTS_DIR .
'/framework/deployTestModules.php';
57 $dirList = new \Magento\Framework\App\Filesystem\DirectoryList(
BP);
60 $dirList->getPath(DirectoryList::VAR_DIR),
65 AutoloaderRegistry::getAutoloader()
68 if (defined(
'TESTS_MAGENTO_INSTALLATION') && TESTS_MAGENTO_INSTALLATION ===
'enabled') {
69 $cleanup = (defined(
'TESTS_CLEANUP') && TESTS_CLEANUP ===
'enabled');
75 new \
Magento\TestFramework\Bootstrap\Environment(),
76 new \
Magento\TestFramework\Bootstrap\WebapiDocBlock(
"{$integrationTestsDir}/testsuite"),
77 new \
Magento\TestFramework\Bootstrap\Profiler(
new \
Magento\Framework\Profiler\Driver\Standard()),
87 ->create(\
Magento\Framework\Component\DirSearch::class);
89 ->create(\
Magento\Framework\View\Design\Theme\ThemePackageList::class);
92 new \
Magento\Framework\Component\ComponentRegistrar(),
98 }
catch (\Exception $e) {
109 function ($errNo, $errStr, $errFile, $errLine) {
110 if (error_reporting()) {
113 E_WARNING =>
'Warning',
115 E_NOTICE =>
'Notice',
116 E_CORE_ERROR =>
'Core Error',
117 E_CORE_WARNING =>
'Core Warning',
118 E_COMPILE_ERROR =>
'Compile Error',
119 E_COMPILE_WARNING =>
'Compile Warning',
120 E_USER_ERROR =>
'User Error',
121 E_USER_WARNING =>
'User Warning',
122 E_USER_NOTICE =>
'User Notice',
123 E_STRICT =>
'Strict',
124 E_RECOVERABLE_ERROR =>
'Recoverable Error',
125 E_DEPRECATED =>
'Deprecated',
126 E_USER_DEPRECATED =>
'User Deprecated',
129 $errName = isset($errorNames[$errNo]) ? $errorNames[$errNo] :
"";
131 throw new \PHPUnit\Framework\Exception(
132 sprintf(
"%s: %s in %s:%s.", $errName, $errStr, $errFile, $errLine),
if(!file_exists($installConfigFile)) $dirList
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)
catch(\Exception $e) setCustomErrorHandler()
static setInstance(\Magento\TestFramework\Helper\Bootstrap $instance)
static getObjectManager()