Add a protected function seedApplicationSettings(): void helper to tests/TestCase.php. The method runs the RequiredDatabaseSeeder and marks the application as installed.
Middleware like LanguageSwitcher reads settings directly from the DB (Setting::where(…)->first()->value) and crashes during feature tests on a freshly migrated empty database. The helper must be called after parent::setUp() (so RefreshDatabase has already run migrations) and before the first request in any test that exercises HTTP middleware.