Skip to content

Commit 0be8141

Browse files
committed
MQE-849: Upgrading MTF PHP version to 7.2
1 parent d1fb65c commit 0be8141

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

dev/tests/functional/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
defined('MTF_TESTS_PATH') || define('MTF_TESTS_PATH', MTF_BP . '/tests/app/');
1010
defined('MTF_STATES_PATH') || define('MTF_STATES_PATH', MTF_BP . '/lib/Magento/Mtf/App/State/');
1111

12-
//require_once __DIR__ . '/../../../app/bootstrap.php';
12+
require_once __DIR__ . '/../../../app/bootstrap.php';
1313
restore_error_handler();
1414
$vendorAutoload = __DIR__ . '/vendor/autoload.php';
1515

dev/tests/functional/lib/Magento/Mtf/Util/ModuleResolver/SequenceSorter.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class SequenceSorter implements SequenceSorterInterface
2222
*/
2323
public function __construct()
2424
{
25-
// $this->initObjectManager();
25+
$this->initObjectManager();
2626
}
2727

2828
/**
@@ -59,20 +59,20 @@ protected function getModuleSequence()
5959
*/
6060
public function sort(array $paths)
6161
{
62-
// $sortedPaths = [];
63-
// $modules = array_keys($this->getModuleSequence());
64-
// foreach ($modules as $module) {
65-
// foreach ($paths as $key => $path) {
66-
// $modulePath = realpath(MTF_TESTS_PATH . str_replace('_', DIRECTORY_SEPARATOR, $module));
67-
// $path = realpath($path);
68-
// if (strpos($path, $modulePath) !== false) {
69-
// $sortedPaths[] = $path;
70-
// unset($paths[$key]);
71-
// }
72-
// }
73-
// }
74-
// $sortedPaths = array_merge($sortedPaths, $paths);
62+
$sortedPaths = [];
63+
$modules = array_keys($this->getModuleSequence());
64+
foreach ($modules as $module) {
65+
foreach ($paths as $key => $path) {
66+
$modulePath = realpath(MTF_TESTS_PATH . str_replace('_', DIRECTORY_SEPARATOR, $module));
67+
$path = realpath($path);
68+
if (strpos($path, $modulePath) !== false) {
69+
$sortedPaths[] = $path;
70+
unset($paths[$key]);
71+
}
72+
}
73+
}
74+
$sortedPaths = array_merge($sortedPaths, $paths);
7575

76-
return $paths;
76+
return $sortedPaths;
7777
}
7878
}

0 commit comments

Comments
 (0)