mirror of
https://github.com/10h30/Test-Laravel-Validation.git
synced 2026-06-05 15:07:56 +09:00
Task 9 - your own validation rule
This commit is contained in:
@@ -104,4 +104,9 @@ class ValidationTest extends TestCase
|
||||
$response->assertSee('Please enter the name');
|
||||
}
|
||||
|
||||
public function test_custom_validation_rule()
|
||||
{
|
||||
$response = $this->post('articles', ['title' => 'lowercase']);
|
||||
$response->assertSessionHasErrors('title')->assertStatus(302);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user