Skip to content

Commit 9fd84bb

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

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/Console/Command/CompareSourceCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ protected function configure()
8585
InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
8686
'Specify report to be used from list: '
8787
. implode(', ', $this->getAllReportTypes())
88-
. 'Example: --report-type=' . ReportTypes::MFTF . PHP_EOL,
88+
. '. Example: --report-type=' . ReportTypes::MFTF . PHP_EOL,
8989
[]
9090
),
9191
]);
@@ -118,7 +118,9 @@ protected function execute(InputInterface $input, OutputInterface $cliOutput)
118118

119119
// validate input
120120
$this->validateAllowedLevel($allowedChangeLevel);
121-
$this->validateAllowedReportType($reportType);
121+
if (!empty($reportType)) {
122+
$this->validateAllowedReportType($reportType);
123+
}
122124

123125
// Generate separate reports for API-annotated code and all code
124126
$reportBuilder = new ReportBuilder(

src/Scanner/ModuleNamespaceResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function resolveByViewDirFilePath(string $filePath): string
4949
public function resolveByTestMftfPath(string $filePath): string
5050
{
5151
$match = [];
52-
preg_match('/(?<vendor>[\w]*?)(\/?)(?<module>[\w]*)\/Test\/Mftf/', $filePath, $match);
52+
preg_match('/(?<vendor>[\-\w]*?)(\/?)(?<module>[\w]*)\/Test\/Mftf/', $filePath, $match);
5353
return empty($match['vendor']) ? $match['module'] : sprintf('%s_%s', $match['vendor'], $match['module']);
5454
}
5555
}

0 commit comments

Comments
 (0)