|
5 | 5 | */
|
6 | 6 |
|
7 | 7 | /**
|
| 8 | + * phpcs:disable PSR1.Files.SideEffects |
| 9 | + * phpcs:disable Squiz.Functions.GlobalFunction |
8 | 10 | * @var string $testFrameworkDir - Must be defined in parent script.
|
9 | 11 | * @var \Magento\TestFramework\Bootstrap\Settings $settings - Must be defined in parent script.
|
10 | 12 | */
|
|
21 | 23 | $source = $file->getPathname();
|
22 | 24 | $relativePath = substr($source, strlen($pathToCommittedTestModules));
|
23 | 25 | $destination = $pathToInstalledMagentoInstanceModules . $relativePath;
|
| 26 | + // phpcs:ignore Magento2.Functions.DiscouragedFunction |
24 | 27 | $targetDir = dirname($destination);
|
| 28 | + // phpcs:ignore Magento2.Functions.DiscouragedFunction |
25 | 29 | if (!is_dir($targetDir)) {
|
| 30 | + // phpcs:ignore Magento2.Functions.DiscouragedFunction |
26 | 31 | mkdir($targetDir, 0755, true);
|
27 | 32 | }
|
| 33 | + // phpcs:ignore Magento2.Functions.DiscouragedFunction |
28 | 34 | copy($source, $destination);
|
29 | 35 | }
|
30 | 36 | }
|
31 | 37 | unset($iterator, $file);
|
32 | 38 |
|
33 | 39 | // Register the modules under '_files/'
|
34 | 40 | $pathPattern = $pathToInstalledMagentoInstanceModules . '/TestModule*/registration.php';
|
| 41 | +// phpcs:ignore Magento2.Functions.DiscouragedFunction |
35 | 42 | $files = glob($pathPattern, GLOB_NOSORT);
|
36 | 43 | if ($files === false) {
|
37 | 44 | throw new \RuntimeException('glob() returned error while searching in \'' . $pathPattern . '\'');
|
|
43 | 50 |
|
44 | 51 | if ((int)$settings->get('TESTS_PARALLEL_RUN') !== 1) {
|
45 | 52 | // Only delete modules if we are not using parallel executions
|
| 53 | + // phpcs:ignore Magento2.Functions.DiscouragedFunction |
46 | 54 | register_shutdown_function(
|
47 | 55 | 'deleteTestModules',
|
48 | 56 | $pathToCommittedTestModules,
|
|
0 commit comments