Skip to content

Commit c61b911

Browse files
committed
MQE-2305: Implement -report-type=mftf in magento-semver to launch MFTF SVC
1 parent 2445373 commit c61b911

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Scanner/ModuleNamespaceResolver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public function resolveByViewDirFilePath(string $filePath): string
4848
*/
4949
public function resolveByTestMftfPath(string $filePath): string
5050
{
51-
$matches = [];
52-
preg_match('/([\w]*)\/([\w]*)\/Test\/Mftf/', $filePath, $matches);
53-
return sprintf('%s_%s', $matches[1], $matches[2]);
51+
$match = [];
52+
preg_match('/(?<vendor>[\w]*?)(\/?)(?<module>[\w]*)\/Test\/Mftf/', $filePath, $match);
53+
return empty($match['vendor']) ? $match['module'] : sprintf('%s_%s', $match['vendor'], $match['module']);
5454
}
5555
}

0 commit comments

Comments
 (0)