From 9403d8c8fda68edace5bd2d62233a19825a507a8 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Thu, 20 Aug 2026 16:44:08 +0200 Subject: [PATCH] Add afterEach cleanup to TenantAssetTest --- tests/TenantAssetTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/TenantAssetTest.php b/tests/TenantAssetTest.php index bedc4d00..a29bef97 100644 --- a/tests/TenantAssetTest.php +++ b/tests/TenantAssetTest.php @@ -41,6 +41,12 @@ beforeEach(function () { Event::listen(TenancyEnded::class, RevertToCentralContext::class); }); +afterEach(function () { + TenantAssetController::$headers = []; + TenantAssetController::$publicDisk = null; + InitializeTenancyByRequestData::$onFail = null; +}); + test('asset can be accessed using the url returned by the tenant asset helper', function () { config(['tenancy.identification.default_middleware' => InitializeTenancyByRequestData::class]); @@ -229,8 +235,6 @@ test('TenantAssetController headers are configurable', function () { $response->assertSuccessful(); $response->assertHeader('X-Foo', 'Bar'); - - TenantAssetController::$headers = []; // reset static property }); test('global asset helper returns the same url regardless of tenancy initialization', function () {