Skip to content

Commit d3b1777

Browse files
committed
Updated the new integrity test according to the code review
1 parent 8a184d7 commit d3b1777

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Test/Integrity/Testsuite/ConfigStructureTest.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ private function validateConfiguration(array $config): array
150150
}
151151

152152
if (!empty($patchErrors)) {
153-
$errors[] = "Patch {$patchId} has invalid configuration:";
153+
$errors[] = "Patch {$patchId} has an invalid configuration:";
154154
$errors = array_merge($errors, $patchErrors);
155155
}
156156
}
@@ -222,7 +222,12 @@ private function validateProperties(
222222
"/^($singleVersionPattern|$versionRangePattern)( \|\| ($singleVersionPattern|$versionRangePattern))*$/";
223223
if (!preg_match($packageConstraintPattern, $packageConstraint)) {
224224
$errors[] = sprintf(
225-
" - Constraint '%s' doesn't match the expected pattern.",
225+
" - Constraint '%s' doesn't match the expected pattern." . PHP_EOL .
226+
" Expected pattern examples:" . PHP_EOL .
227+
" - ^2.3.0" . PHP_EOL .
228+
" - >=1.1.6" . PHP_EOL .
229+
" - ~2.3.6 || >=2.4.0" . PHP_EOL .
230+
" - >2.4.0 <2.4.1 || >=2.4.3 <=2.4.3-p2",
226231
$packageConstraint
227232
);
228233
}

0 commit comments

Comments
 (0)