From 624f032775473caeed5e8456e35f2f48983bb0ea Mon Sep 17 00:00:00 2001 From: lukinovec Date: Fri, 9 Sep 2022 07:50:27 +0200 Subject: [PATCH] Save `storage_path()` in a variable after initializing tenant in test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Samuel Ć tancl --- tests/BootstrapperTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/BootstrapperTest.php b/tests/BootstrapperTest.php index f68e43e9..921a9b99 100644 --- a/tests/BootstrapperTest.php +++ b/tests/BootstrapperTest.php @@ -201,16 +201,17 @@ test('tenant storage gets deleted after the tenant if filesystem.delete_storage_ }); tenancy()->initialize(Tenant::create()); + $tenantStoragePath = storage_path(); Storage::fake('test'); - expect(File::isDirectory(storage_path()))->toBeTrue(); + expect(File::isDirectory($tenantStoragePath))->toBeTrue(); Storage::put('test.txt', 'testing file'); tenant()->delete(); - expect(File::isDirectory(storage_path()))->toBeFalse(); + expect(File::isDirectory($tenantStoragePath))->toBeFalse(); }); function getDiskPrefix(string $disk): string