Skip to content

Commit

Permalink
Updated the new integrity test according to the code review
Browse files Browse the repository at this point in the history
  • Loading branch information
katmoon committed Nov 17, 2023
1 parent 8a184d7 commit d3b1777
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Test/Integrity/Testsuite/ConfigStructureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ private function validateConfiguration(array $config): array
}

if (!empty($patchErrors)) {
$errors[] = "Patch {$patchId} has invalid configuration:";
$errors[] = "Patch {$patchId} has an invalid configuration:";
$errors = array_merge($errors, $patchErrors);
}
}
Expand Down Expand Up @@ -222,7 +222,12 @@ private function validateProperties(
"/^($singleVersionPattern|$versionRangePattern)( \|\| ($singleVersionPattern|$versionRangePattern))*$/";
if (!preg_match($packageConstraintPattern, $packageConstraint)) {
$errors[] = sprintf(
" - Constraint '%s' doesn't match the expected pattern.",
" - Constraint '%s' doesn't match the expected pattern." . PHP_EOL .
" Expected pattern examples:" . PHP_EOL .
" - ^2.3.0" . PHP_EOL .
" - >=1.1.6" . PHP_EOL .
" - ~2.3.6 || >=2.4.0" . PHP_EOL .
" - >2.4.0 <2.4.1 || >=2.4.3 <=2.4.3-p2",
$packageConstraint
);
}
Expand Down

0 comments on commit d3b1777

Please sign in to comment.