guardAgainstMissingEnv(); parent::setUp(); $this->registerCustomMacros(); $this->withoutMiddleware($this->globallyDisabledMiddleware); $this->initializeSettings(); // Flush the custom field filter map cache between tests so that // dynamically-created custom fields are always picked up fresh. Asset::flushCustomFieldFilterMap(); } // ...existing code... private function guardAgainstMissingEnv(): void { if (! file_exists(realpath(__DIR__.'/../').'/.env.testing')) { throw new RuntimeException( '.env.testing file does not exist. Aborting to avoid wiping your local database.' ); } } }