Skip to content

Commit aa10200

Browse files
committed
Fix regular expressions for 'exclude tests'
1 parent ed2ffad commit aa10200

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

setup/src/Magento/Setup/Console/Command/DiCompileCommand.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ private function getExcludedModulePaths(array $modulePaths)
256256
}
257257

258258
$excludedModulePaths = [
259-
'#^(?:' . join('|', $basePathsRegExps) . ')/Test#',
260-
'#^(?:' . join('|', $basePathsRegExps) . ')/tests#',
259+
'#^(?:' . join('|', $basePathsRegExps) . ')/Tests?/#',
260+
'#^(?:' . join('|', $basePathsRegExps) . ')/tests/#',
261261
];
262262
return $excludedModulePaths;
263263
}
@@ -278,8 +278,8 @@ function ($libraryPath) {
278278
);
279279

280280
$excludedLibraryPaths = [
281-
'#^(?:' . join('|', $libraryPaths) . ')/([\\w]+/)?Test#',
282-
'#^(?:' . join('|', $libraryPaths) . ')/([\\w]+/)?tests#',
281+
'#^(?:' . join('|', $libraryPaths) . ')/([\\w]+/)?Tests?/#',
282+
'#^(?:' . join('|', $libraryPaths) . ')/([\\w]+/)?tests/#',
283283
];
284284
return $excludedLibraryPaths;
285285
}
@@ -293,7 +293,7 @@ function ($libraryPath) {
293293
private function getExcludedSetupPaths($setupPath)
294294
{
295295
return [
296-
'#^(?:' . preg_quote($setupPath, '#') . ')(/[\\w]+)*/Test#'
296+
'#^(?:' . preg_quote($setupPath, '#') . ')(/[\\w]+)*/Tests?/#'
297297
];
298298
}
299299

0 commit comments

Comments
 (0)