@@ -22,7 +22,7 @@ class SequenceSorter implements SequenceSorterInterface
22
22
*/
23
23
public function __construct ()
24
24
{
25
- // $this->initObjectManager();
25
+ $ this ->initObjectManager ();
26
26
}
27
27
28
28
/**
@@ -59,20 +59,20 @@ protected function getModuleSequence()
59
59
*/
60
60
public function sort (array $ paths )
61
61
{
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 );
75
75
76
- return $ paths ;
76
+ return $ sortedPaths ;
77
77
}
78
78
}
0 commit comments