D
D
Denis2021-03-05 09:59:28
Laravel
Denis, 2021-03-05 09:59:28

Tests in Laravel how to authorize a user?

I am writing tests in a project, do I need to check the controller in which only an authorized user can perform actions? I generate users in the test using Faker. Is it possible to somehow simulate that the user is authorized?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2021-03-05
@Drumsid

https://laravel.com/docs/8.x/http-tests#session-an...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question