@@ -18,19 +18,20 @@ class CountTest extends AbstractTest
1818
1919 public static function provideRuleUnexpectedValueData (): \Generator
2020 {
21- $ missingOptionsMessage = '/At least one of the options "min" or "max" must be given./ ' ;
22- $ invalidTypeMessage = '/Expected value of type "array|\Countable", "(.*)" given./ ' ;
23- $ constraintMessage = '/Maximum value must be greater than or equal to minimum value./ ' ;
21+ $ unexpectedOptionMessage = '/At least one of the options "min" or "max" must be given./ ' ;
22+ $ unexpectedTypeMessage = '/Expected value of type "array|\Countable", "(.*)" given./ ' ;
23+ $ unexpectedMinMaxMessage = '/Maximum value must be greater than or equal to minimum value./ ' ;
2424
25- yield 'missing options ' => [new Count (), [1 , 2 , 3 ], $ missingOptionsMessage ];
26- yield 'invalid type value ' => [new Count (min: 5 , max: 10 ), 1 , $ invalidTypeMessage ];
27- yield 'min greater than max constraint ' => [new Count (min: 10 , max: 5 ), 1 , $ constraintMessage ];
25+ yield 'missing options ' => [new Count (), [1 , 2 , 3 ], $ unexpectedOptionMessage ];
26+ yield 'invalid type value ' => [new Count (min: 5 , max: 10 ), 1 , $ unexpectedTypeMessage ];
27+ yield 'min greater than max constraint ' => [new Count (min: 3 , max: 2 ), [ 1 , 2 , 3 ], $ unexpectedMinMaxMessage ];
2828 }
2929
3030 public static function provideRuleFailureConditionData (): \Generator
3131 {
3232 $ value = [1 , 2 , 3 , 4 , 5 ];
3333 $ exception = CountException::class;
34+
3435 $ minMessage = '/The (.*) value should contain (.*) elements or more, (.*) elements given./ ' ;
3536 $ maxMessage = '/The (.*) value should contain (.*) elements or less, (.*) elements given./ ' ;
3637 $ exactMessage = '/The (.*) value should contain exactly (.*) elements, (.*) elements given./ ' ;
0 commit comments