diff --git a/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php b/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php index 1246c93b1e10a..000403168ef97 100644 --- a/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php +++ b/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php @@ -227,6 +227,7 @@ private function getExcludedModulePaths(array $modulePaths) $excludedModulePaths = [ '#^(?:' . join('|', $basePathsRegExps) . ')/Test#', + '#^(?:' . join('|', $basePathsRegExps) . ')/tests#', ]; return $excludedModulePaths; } @@ -241,6 +242,7 @@ private function getExcludedLibraryPaths(array $libraryPaths) { $excludedLibraryPaths = [ '#^(?:' . join('|', $libraryPaths) . ')/([\\w]+/)?Test#', + '#^(?:' . join('|', $libraryPaths) . ')/([\\w]+/)?tests#', ]; return $excludedLibraryPaths; }