mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 12:54:05 +00:00
Final filesystem-related changes (#25)
* Change %tenant_id% to %tenant% * ID -> key --------- Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
This commit is contained in:
parent
6784685054
commit
222bbe4c02
6 changed files with 14 additions and 15 deletions
|
|
@ -233,7 +233,7 @@ test('tenant storage can get deleted after the tenant when DeletingTenant listen
|
|||
FilesystemTenancyBootstrapper::class,
|
||||
],
|
||||
'tenancy.filesystem.root_override.public' => '%storage_path%/app/public/',
|
||||
'tenancy.filesystem.url_override.public' => 'public-%tenant_id%'
|
||||
'tenancy.filesystem.url_override.public' => 'public-%tenant%'
|
||||
]);
|
||||
|
||||
$tenant1 = Tenant::create();
|
||||
|
|
@ -276,7 +276,7 @@ test('files can get fetched using the storage url', function() {
|
|||
FilesystemTenancyBootstrapper::class,
|
||||
],
|
||||
'tenancy.filesystem.root_override.public' => '%storage_path%/app/public/',
|
||||
'tenancy.filesystem.url_override.public' => 'public-%tenant_id%'
|
||||
'tenancy.filesystem.url_override.public' => 'public-%tenant%'
|
||||
]);
|
||||
|
||||
$tenant1 = Tenant::create();
|
||||
|
|
@ -289,7 +289,7 @@ test('files can get fetched using the storage url', function() {
|
|||
Storage::disk('public')->put($tenantFileName = 'tenant1.txt', $tenantKey = $tenant1->getTenantKey());
|
||||
|
||||
$url = Storage::disk('public')->url($tenantFileName);
|
||||
$tenantDiskName = Str::of(config('tenancy.filesystem.url_override.public'))->replace('%tenant_id%', $tenantKey);
|
||||
$tenantDiskName = Str::of(config('tenancy.filesystem.url_override.public'))->replace('%tenant%', $tenantKey);
|
||||
$hostname = Str::of($url)->before($tenantDiskName);
|
||||
$parsedUrl = Str::of($url)->after($hostname);
|
||||
|
||||
|
|
@ -300,7 +300,7 @@ test('files can get fetched using the storage url', function() {
|
|||
Storage::disk('public')->put($tenantFileName = 'tenant2.txt', $tenantKey = $tenant2->getTenantKey());
|
||||
|
||||
$url = Storage::disk('public')->url($tenantFileName);
|
||||
$tenantDiskName = Str::of(config('tenancy.filesystem.url_override.public'))->replace('%tenant_id%', $tenantKey);
|
||||
$tenantDiskName = Str::of(config('tenancy.filesystem.url_override.public'))->replace('%tenant%', $tenantKey);
|
||||
$hostname = Str::of($url)->before($tenantDiskName);
|
||||
$parsedUrl = Str::of($url)->after($hostname);
|
||||
|
||||
|
|
@ -337,7 +337,7 @@ test('create and delete storage symlinks jobs work', function() {
|
|||
],
|
||||
'tenancy.filesystem.suffix_base' => 'tenant-',
|
||||
'tenancy.filesystem.root_override.public' => '%storage_path%/app/public/',
|
||||
'tenancy.filesystem.url_override.public' => 'public-%tenant_id%'
|
||||
'tenancy.filesystem.url_override.public' => 'public-%tenant%'
|
||||
]);
|
||||
|
||||
/** @var Tenant $tenant */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue