Skip to content

Commit a4f9ff8

Browse files
committed
MQE-1541: Add option to generate:tests for XSD validation on 'merged files'
1 parent b3e5912 commit a4f9ff8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Magento/FunctionalTestingFramework/Config/Reader/Filesystem.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,13 @@ protected function validateSchema($configMerger, $filename = null)
231231
if ($this->validationState->isValidationRequired()) {
232232
$errors = [];
233233
if ($configMerger && !$configMerger->validate($this->schemaFile, $errors)) {
234-
$message = $filename ? $filename . PHP_EOL . "Invalid Document \n" : PHP_EOL . "Invalid Document \n";
235-
foreach ($errors as $error ){
234+
foreach ($errors as $error){
236235
LoggingUtil::getInstance()->getLogger(Filesystem::class)->buildFailure(
237-
"XSD schema validation error",
236+
"XSD schema error ",
238237
[ "file"=> $filename ? $filename: ":mergedFile:", "error" => $error]
239238
);
240239
}
241-
throw new \Exception($message . implode("\n", $errors));
240+
throw new \Exception("Error: XSD schema issues found in file(s) " . $filename . "\n");
242241
}
243242
}
244243
}

0 commit comments

Comments
 (0)