mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 16:54:05 +00:00
Save storage_path() in a variable after initializing tenant in test
Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
This commit is contained in:
parent
21664664dd
commit
624f032775
1 changed files with 3 additions and 2 deletions
|
|
@ -201,16 +201,17 @@ test('tenant storage gets deleted after the tenant if filesystem.delete_storage_
|
||||||
});
|
});
|
||||||
|
|
||||||
tenancy()->initialize(Tenant::create());
|
tenancy()->initialize(Tenant::create());
|
||||||
|
$tenantStoragePath = storage_path();
|
||||||
|
|
||||||
Storage::fake('test');
|
Storage::fake('test');
|
||||||
|
|
||||||
expect(File::isDirectory(storage_path()))->toBeTrue();
|
expect(File::isDirectory($tenantStoragePath))->toBeTrue();
|
||||||
|
|
||||||
Storage::put('test.txt', 'testing file');
|
Storage::put('test.txt', 'testing file');
|
||||||
|
|
||||||
tenant()->delete();
|
tenant()->delete();
|
||||||
|
|
||||||
expect(File::isDirectory(storage_path()))->toBeFalse();
|
expect(File::isDirectory($tenantStoragePath))->toBeFalse();
|
||||||
});
|
});
|
||||||
|
|
||||||
function getDiskPrefix(string $disk): string
|
function getDiskPrefix(string $disk): string
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue