| Total Complexity | 3 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class LessThanTest extends ConfiguredConstraintTestCase |
||
| 10 | { |
||
| 11 | public function testEmptyConfiguration(): void |
||
| 12 | { |
||
| 13 | $this->expectException(MissingOptionsException::class); |
||
| 14 | |||
| 15 | new ParsleyAssert\LessThan(); |
||
| 16 | } |
||
| 17 | |||
| 18 | public function testInvalidConfiguration(): void |
||
| 19 | { |
||
| 20 | $this->expectException(InvalidOptionsException::class); |
||
| 21 | |||
| 22 | new ParsleyAssert\LessThan([ |
||
| 23 | 'value' => '10', |
||
| 24 | ]); |
||
| 25 | } |
||
| 26 | |||
| 27 | public function testNormalization(): void |
||
| 28 | { |
||
| 29 | $constraint = new ParsleyAssert\LessThan([ |
||
| 30 | 'value' => 10, |
||
| 31 | ]); |
||
| 32 | |||
| 33 | $this->assertSame([ |
||
| 34 | 'data-parsley-lt' => '10', |
||
| 35 | 'data-parsley-lt-message' => 'Invalid.', |
||
| 36 | ], $constraint->normalize($this->normalizer)); |
||
| 37 | } |
||
| 39 |