@@ -81,9 +81,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
81
81
$ codeceptionCommand = realpath (PROJECT_ROOT . '/vendor/bin/codecept ' ) . ' run functional ' ;
82
82
$ testsDirectory = TESTS_MODULE_PATH . DIRECTORY_SEPARATOR . TestGenerator::GENERATED_DIR . DIRECTORY_SEPARATOR ;
83
83
//execute only tests specified as arguments in run command
84
- foreach ($ resolvedTests as $ test ){
84
+ foreach ($ resolvedTests as $ test ) {
85
85
// for tests in suite, set directory as suite name
86
- if (strpos ($ test , ': ' )) {
86
+ if (strpos ($ test , ': ' )) {
87
87
list ($ suite , $ testName ) = explode (": " , $ test );
88
88
}
89
89
// for standalone tests set directory as "default"
@@ -114,22 +114,23 @@ function ($type, $buffer) use ($output) {
114
114
115
115
/** Get an array of tests with resolved suite references from $testConfiguration
116
116
* eg: if test is referenced in a suite, it'll be stored in format "SuiteName:Testname";
117
- * if not it'll be stored as is.
118
- * @param $testConfiguration
117
+ * @param array $testConfiguration
119
118
* @return array
120
119
*/
121
- private function getResolvedTests ($ testConfiguration )
120
+ private function getResolvedTests (array $ testConfiguration )
122
121
{
123
122
$ testsArray = $ testConfiguration ['tests ' ] ?? [];
124
123
$ suitesArray = $ testConfiguration ['suites ' ] ?? [];
125
124
$ testArrayBuilder = [];
125
+
126
126
foreach ($ suitesArray as $ suite => $ tests ) {
127
- $ testArrayBuilder = array_merge ($ testArrayBuilder ,
128
- array_map (function ($ test ) use ($ suite )
129
- { return $ suite . ': ' . $ test ; }, $ tests ));
127
+ $ testArrayBuilder = array_merge (
128
+ $ testArrayBuilder ,
129
+ array_map (function ($ test ) use ($ suite ) {
130
+ return $ suite . ': ' . $ test ;
131
+ }, $ tests )
132
+ );
130
133
}
131
134
return array_merge ($ testArrayBuilder , $ testsArray );
132
-
133
-
134
135
}
135
136
}
0 commit comments