We are using the 'unique' rule for validation on the application, but for tests we're mocking the database layer through the use of repository pattern. Is there a way to mock the unique rule so that it doesn't attempt to check the database?
I tried mocking Illuminate\Validation\Validator::validateUnique it doesn't work but since the method is protected.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire