mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 19:04:02 +00:00
Fix issue with using str()
This commit is contained in:
parent
866c9f8351
commit
c27f8e80bf
1 changed files with 6 additions and 6 deletions
|
|
@ -253,9 +253,9 @@ 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(config('tenancy.filesystem.url_override.public'))->replace('%tenant_id%', $tenantKey);
|
||||
$hostname = str($url)->before($tenantDiskName);
|
||||
$parsedUrl = str($url)->after($hostname);
|
||||
$tenantDiskName = Str::of(config('tenancy.filesystem.url_override.public'))->replace('%tenant_id%', $tenantKey);
|
||||
$hostname = Str::of($url)->before($tenantDiskName);
|
||||
$parsedUrl = Str::of($url)->after($hostname);
|
||||
|
||||
expect(file_get_contents(public_path($parsedUrl)))->toBe($tenantKey);
|
||||
|
||||
|
|
@ -264,9 +264,9 @@ 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(config('tenancy.filesystem.url_override.public'))->replace('%tenant_id%', $tenantKey);
|
||||
$hostname = str($url)->before($tenantDiskName);
|
||||
$parsedUrl = str($url)->after($hostname);
|
||||
$tenantDiskName = Str::of(config('tenancy.filesystem.url_override.public'))->replace('%tenant_id%', $tenantKey);
|
||||
$hostname = Str::of($url)->before($tenantDiskName);
|
||||
$parsedUrl = Str::of($url)->after($hostname);
|
||||
|
||||
expect(file_get_contents(public_path($parsedUrl)))->toBe($tenantKey);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue