| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | public function test_multi_rules() |
||
| 35 | { |
||
| 36 | $email = ''; |
||
| 37 | |||
| 38 | $field = (new Field('email')) |
||
| 39 | ->required($email) |
||
| 40 | ->validEmail($email) |
||
| 41 | ->lengthBetweenOrEqual($email, 5, 10); |
||
| 42 | $this->assertFalse($field->isValid($this->language)); |
||
| 43 | $this->assertEquals([ |
||
| 44 | 'field is required', |
||
| 45 | 'field must be a valid email address', |
||
| 46 | 'field length must be greater or equal than 5 or less or equal than 10', |
||
| 47 | ], $field->getErrors()); |
||
| 48 | } |
||
| 49 | } |
||
| 50 |