You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I'm using the Api class in my routes/api.php file, but that broke my tests as if no routes were defined, e.g.
Symfony\Component\Routing\Exception\RouteNotFoundException : Route [api.weather.daily] not defined.
I tried building the Api resources before or after the Route:: definitions, but the result is the same; I have to skip the swagger stuff if the tests are running
if (!app()->environment('testing')) {
Api::get('/some', [ApiController::class, 'some']);
...
}
Any clue?
Using version 1.4.0 on Laravel 9.x.
The text was updated successfully, but these errors were encountered:
Actually, after further playing around with it it seems the Api definitions actually break the Auth pattern, that is the Sanctum guard is skipped entirely.
Hey, I'm using the
Api
class in myroutes/api.php
file, but that broke my tests as if no routes were defined, e.g.I tried building the
Api
resources before or after theRoute::
definitions, but the result is the same; I have to skip the swagger stuff if the tests are runningAny clue?
Using version 1.4.0 on Laravel 9.x.
The text was updated successfully, but these errors were encountered: