defaultTenant = Tenant::firstOrCreate( ['code' => 'TEST-LGU'], [ 'name' => 'Test LGU', 'short_name' => 'Test', 'status' => Tenant::STATUS_ACTIVE, ], ); Tenancy::setCurrent($this->defaultTenant); $this->withHeaders(['X-Tenant-Code' => $this->defaultTenant->code]); } protected function tearDown(): void { Tenancy::clear(); parent::tearDown(); } }