Level 18
Check out the Passport GitHub repo's test folders.
Passport: https://github.com/laravel/passport/blob/10.x/tests/Unit/TransientTokenTest.php uses $token->can('foo').
Hi,
I'm trying to test some code which is protected by tokenCan() (https://laravel.com/docs/8.x/passport#checking-scopes-on-a-token-instance).
How can I test this code? The tokenCan() always fails because middleware is disabled in my tests (and therefore there isn't a token).
Cheers,
Mick
Please or to participate in this conversation.