<?phpuse App\Filament\Resources\FileResource;use function Pest\Livewire\livewire;use App\Models\User;use App\Models\File;it('redirects to login for guest', function () { test()->get(FileResource::getUrl('create')) ->assertStatus(302) ->assertRedirect(route('filament.auth.login'));});
<?phpnamespace Tests;use App\Providers\Filament\AppPanelProvider;use Illuminate\Foundation\Testing\LazilyRefreshDatabase;use Illuminate\Foundation\Testing\TestCase as BaseTestCase;abstract class TestCase extends BaseTestCase{ use CreatesApplication; use LazilyRefreshDatabase;}