Total Complexity | 2 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class ErrorMessagesTest extends SapphireTest |
||
14 | { |
||
15 | /** |
||
16 | * @throws Exception |
||
17 | */ |
||
18 | public function testErrorMessageExists() |
||
19 | { |
||
20 | $validator = Validator::make( |
||
21 | [], |
||
22 | ['Name' => 'required'] |
||
23 | ); |
||
24 | |||
25 | $validator->validate(); |
||
26 | |||
27 | $this->assertSame([ |
||
28 | 'The Name is required.' |
||
29 | ], $validator->errors()['Name']); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @throws Exception |
||
34 | */ |
||
35 | public function testCustomErrorMessage() |
||
51 | } |
||
52 | } |
||
53 |