Answer the question
In order to leave comments, you need to log in
I am writing phpunit tests for API - why does it always give 500 error instead of 404 or 403 in tests?
For example, I write:
and it gives 404 according to the situation and in postman, for example, but when testing in the console, it writes
And how can I display the error stack in general to see where exactly the error is, as when testing through a browser or postman? Is it even possible to do this in phpunit?
Thank you.
$response->assertStatus(200);
Expected status code 200 but received 500.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question