Do you create a test for each validation rule of each fields?

Posted 9 months ago by joshuajazleung

I was watching this video https://laracasts.com/series/phpunit-testing-in-laravel/episodes/17?autoplay=true And jeffrey creates single test for each validation rule.

I am wondering if that's the standard way of testing validation rules? Say I have 10 fields and each field has 3 validation rules, that's 30 tests....

Would it be better if I create a test for each field? So only 10 tests in total?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.