Testing auth with actingAs inside panel
Updating tests for v3 but how do you register a panel because the auth check is always null?
5 Replies
Make sure your TestCase has all of the new middleware providers for Filament v3.
Think I have all the ones that I need:
I'm testing from inside a Laravel package so I don't have access to
App\Providers\Filament\AdminPanelProvider
which is possibly what's missing?try
PanelsServiceProvider::class
you can look at https://github.com/filamentphp/plugin-skeleton/blob/3.x/tests/TestCase.php for all the service providers added to the plugin skeleton for v3
GitHub
plugin-skeleton/tests/TestCase.php at 3.x · filamentphp/plugin-skel...
A package skeleton for developing Filament plugins. - filamentphp/plugin-skeleton
Nevermind.
FilamentServiceProvider
is the panel provider.