Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | public function testValidateAddsErrorWhenMinValueIsGreaterThanMaxValue() |
||
19 | { |
||
20 | /** @var EditableNumericField $field */ |
||
21 | $field = EditableNumericField::create(); |
||
22 | $field->MinValue = 10; |
||
|
|||
23 | $field->MaxValue = 5; |
||
24 | |||
25 | $result = $field->validate(); |
||
26 | $this->assertFalse($result->isValid(), 'Validation should fail when min is greater than max'); |
||
27 | $this->assertContains('Minimum length should be less than the maximum length', $result->serialize()); |
||
28 | } |
||
41 |