@@ -147,7 +147,7 @@ public function getModuleName(string $filePath, array $moduleNameToPath): ?strin
147
147
* @param array $extendedTestMapping
148
148
* @return array
149
149
*/
150
- public function mergeDependenciesForExtendingTests (array $ testDependencies , array $ extendedTestMapping = []): array
150
+ public function mergeDependenciesForExtendingTests (array $ testDependencies , $ filterList , array $ extendedTestMapping = []): array
151
151
{
152
152
$ temp_array = array_reverse (array_column ($ testDependencies , "test_name " ), true );
153
153
if (!empty ($ extendedTestMapping )) {
@@ -165,19 +165,30 @@ public function mergeDependenciesForExtendingTests(array $testDependencies, arra
165
165
}
166
166
$ testDependencies = [];
167
167
foreach ($ temp_array as $ testDependencyArray ) {
168
- $ testDependencies [] = [
169
- "file_path " => array_column ($ testDependencyArray , 'file_path ' ),
170
- "full_name " => $ testDependencyArray [0 ]["full_name " ],
171
- "test_name " => $ testDependencyArray [0 ]["test_name " ],
172
- "test_modules " =>array_values (
173
- array_unique (
174
- call_user_func_array (
175
- 'array_merge ' ,
176
- array_column ($ testDependencyArray , 'test_modules ' )
168
+ $ filTerString = [];
169
+ $ contents = "" ;
170
+ $ flag = false ;
171
+ foreach ($ filterList ['excludeGroup ' ] as $ filterListData ) {
172
+ $ contents = file_get_contents ($ testDependencyArray [0 ]["file_path " ]);
173
+ if (str_contains ($ contents , $ filterListData )) {
174
+ $ flag = true ;
175
+ }
176
+ }
177
+ if ($ flag == false ) {
178
+ $ testDependencies [] = [
179
+ "file_path " => array_column ($ testDependencyArray , 'file_path ' ),
180
+ "full_name " => $ testDependencyArray [0 ]["full_name " ],
181
+ "test_name " => $ testDependencyArray [0 ]["test_name " ],
182
+ "test_modules " => array_values (
183
+ array_unique (
184
+ call_user_func_array (
185
+ 'array_merge ' ,
186
+ array_column ($ testDependencyArray , 'test_modules ' )
187
+ )
177
188
)
178
- )
179
- ),
180
- ];
189
+ ),
190
+ ];
191
+ }
181
192
}
182
193
return $ testDependencies ;
183
194
}
0 commit comments