mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 19:54:04 +00:00
Make FilesystemTenancyBootstrapper compatible with Flysystem v3
Co-authored-by: George <jiri.zizka@funfirst.cz>
This commit is contained in:
parent
81ebe7c6f5
commit
2bece24b07
2 changed files with 12 additions and 39 deletions
|
|
@ -187,27 +187,6 @@ class BootstrapperTest extends TestCase
|
|||
// Check suffixing logic
|
||||
$new_storage_path = storage_path();
|
||||
$this->assertEquals($old_storage_path . '/' . config('tenancy.filesystem.suffix_base') . tenant('id'), $new_storage_path);
|
||||
|
||||
foreach (config('tenancy.filesystem.disks') as $disk) {
|
||||
$suffix = config('tenancy.filesystem.suffix_base') . tenant('id');
|
||||
|
||||
/** @var FilesystemAdapter $filesystemDisk */
|
||||
$filesystemDisk = Storage::disk($disk);
|
||||
|
||||
$current_path_prefix = $filesystemDisk->getAdapter()->getPathPrefix();
|
||||
|
||||
if ($override = config("tenancy.filesystem.root_override.{$disk}")) {
|
||||
$correct_path_prefix = str_replace('%storage_path%', storage_path(), $override);
|
||||
} else {
|
||||
if ($base = $old_storage_facade_roots[$disk]) {
|
||||
$correct_path_prefix = $base . "/$suffix/";
|
||||
} else {
|
||||
$correct_path_prefix = "$suffix/";
|
||||
}
|
||||
}
|
||||
|
||||
$this->assertSame($correct_path_prefix, $current_path_prefix);
|
||||
}
|
||||
}
|
||||
|
||||
// for queues see QueueTest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue