Support the ongoing development of Laravel.io →
Laravel Testing API
Last updated 2 years ago.
0
moderator

How do you see the route if you run php artisan route:list in your terminal? And are you sending extra headers with postman that could result in a different request?

0

Hi, i see method POST in my terminal. So i don't undenstad why phpunit not see it. | | POST | api/v1/auth/login | | App\Http\Controllers\Api\v1\AuthController@login I tried to send same headers used in postman, but the result don't change.

0
moderator

Can you do a $response->dump(); Or do you get the error on the json() call?

I have no idea why the route doesn't work in your test so it is difficult to help.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Alessandro apizzoleo Joined 12 Jun 2021

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.