Skip to content

Commit 2ff2c4e

Browse files
committed
Fix static tests.
1 parent 882c691 commit 2ff2c4e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

dev/tests/integration/framework/bootstrap.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
*/
66
use Magento\Framework\Autoload\AutoloaderRegistry;
77

8+
// phpcs:ignore Magento2.Security.IncludeFile
89
require_once __DIR__ . '/../../../../app/bootstrap.php';
10+
// phpcs:ignore Magento2.Security.IncludeFile
911
require_once __DIR__ . '/autoload.php';
1012

1113
$testsBaseDir = dirname(__DIR__);
@@ -26,6 +28,7 @@
2628
$settings = new \Magento\TestFramework\Bootstrap\Settings($testsBaseDir, get_defined_constants());
2729

2830
$testFrameworkDir = __DIR__;
31+
// phpcs:ignore Magento2.Security.IncludeFile
2932
require_once 'deployTestModules.php';
3033

3134
if ($settings->get('TESTS_EXTRA_VERBOSE_LOG')) {
@@ -51,7 +54,7 @@
5154
if (!file_exists($globalConfigFile)) {
5255
$globalConfigFile .= '.dist';
5356
}
54-
$sandboxUniqueId = md5(sha1_file($installConfigFile));
57+
$sandboxUniqueId = hash('sha256', sha1_file($installConfigFile));
5558
$installDir = TESTS_TEMP_DIR . "/sandbox-{$settings->get('TESTS_PARALLEL_THREAD', 0)}-{$sandboxUniqueId}";
5659
$application = new \Magento\TestFramework\Application(
5760
$shell,
@@ -99,7 +102,9 @@
99102
/* Unset declared global variables to release the PHPUnit from maintaining their values between tests */
100103
unset($testsBaseDir, $logWriter, $settings, $shell, $application, $bootstrap);
101104
} catch (\Exception $e) {
105+
// phpcs:ignore Magento2.Security.LanguageConstruct.DirectOutput
102106
echo $e . PHP_EOL;
107+
// phpcs:ignore Magento2.Security.LanguageConstruct.ExitUsage
103108
exit(1);
104109
}
105110

dev/tests/integration/framework/deployTestModules.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
throw new \RuntimeException('glob() returned error while searching in \'' . $pathPattern . '\'');
3838
}
3939
foreach ($files as $file) {
40+
// phpcs:ignore Magento2.Security.IncludeFile
4041
include $file;
4142
}
4243

0 commit comments

Comments
 (0)