Skip to content

Commit efbf154

Browse files
committed
#18459: Static test fix.
1 parent d039298 commit efbf154

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

dev/tests/integration/framework/bootstrap.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@
55
*/
66
use Magento\Framework\Autoload\AutoloaderRegistry;
77

8-
// phpcs:ignore Magento2.Security.IncludeFile
8+
/**
9+
* phpcs:disable PSR1.Files.SideEffects
10+
* phpcs:disable Squiz.Functions.GlobalFunction
11+
* phpcs:disable Magento2.Security.IncludeFile
12+
*/
913
require_once __DIR__ . '/../../../../app/bootstrap.php';
10-
// phpcs:ignore Magento2.Security.IncludeFile
1114
require_once __DIR__ . '/autoload.php';
1215

16+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
1317
$testsBaseDir = dirname(__DIR__);
1418
$fixtureBaseDir = $testsBaseDir. '/testsuite';
1519

@@ -28,7 +32,6 @@
2832
$settings = new \Magento\TestFramework\Bootstrap\Settings($testsBaseDir, get_defined_constants());
2933

3034
$testFrameworkDir = __DIR__;
31-
// phpcs:ignore Magento2.Security.IncludeFile
3235
require_once 'deployTestModules.php';
3336

3437
if ($settings->get('TESTS_EXTRA_VERBOSE_LOG')) {
@@ -47,10 +50,12 @@
4750
}
4851

4952
$installConfigFile = $settings->getAsConfigFile('TESTS_INSTALL_CONFIG_FILE');
53+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
5054
if (!file_exists($installConfigFile)) {
5155
$installConfigFile .= '.dist';
5256
}
5357
$globalConfigFile = $settings->getAsConfigFile('TESTS_GLOBAL_CONFIG_FILE');
58+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
5459
if (!file_exists($globalConfigFile)) {
5560
$globalConfigFile .= '.dist';
5661
}

dev/tests/integration/framework/deployTestModules.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66

77
/**
8+
* phpcs:disable PSR1.Files.SideEffects
9+
* phpcs:disable Squiz.Functions.GlobalFunction
810
* @var string $testFrameworkDir - Must be defined in parent script.
911
* @var \Magento\TestFramework\Bootstrap\Settings $settings - Must be defined in parent script.
1012
*/
@@ -21,17 +23,22 @@
2123
$source = $file->getPathname();
2224
$relativePath = substr($source, strlen($pathToCommittedTestModules));
2325
$destination = $pathToInstalledMagentoInstanceModules . $relativePath;
26+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
2427
$targetDir = dirname($destination);
28+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
2529
if (!is_dir($targetDir)) {
30+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
2631
mkdir($targetDir, 0755, true);
2732
}
33+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
2834
copy($source, $destination);
2935
}
3036
}
3137
unset($iterator, $file);
3238

3339
// Register the modules under '_files/'
3440
$pathPattern = $pathToInstalledMagentoInstanceModules . '/TestModule*/registration.php';
41+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
3542
$files = glob($pathPattern, GLOB_NOSORT);
3643
if ($files === false) {
3744
throw new \RuntimeException('glob() returned error while searching in \'' . $pathPattern . '\'');
@@ -43,6 +50,7 @@
4350

4451
if ((int)$settings->get('TESTS_PARALLEL_RUN') !== 1) {
4552
// Only delete modules if we are not using parallel executions
53+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
4654
register_shutdown_function(
4755
'deleteTestModules',
4856
$pathToCommittedTestModules,

0 commit comments

Comments
 (0)