1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 19:14:04 +00:00

Fix a lot of bugs, fix #23

This commit is contained in:
Samuel Štancl 2019-02-08 22:44:46 +01:00
parent 39d9c9d51e
commit 22fc843ce3
10 changed files with 88 additions and 23 deletions

View file

@ -25,7 +25,14 @@ class ReidentificationTest extends TestCase
foreach (config('tenancy.filesystem.disks') as $disk) {
$suffix = config('tenancy.filesystem.suffix_base') . tenant('uuid');
$current_path_prefix = \Storage::disk($disk)->getAdapter()->getPathPrefix();
$this->assertSame($originals[$disk] . "/$suffix/", $current_path_prefix);
if ($override = config("tenancy.filesystem.root_override.{$disk}")) {
$correct_path_prefix = str_replace("%storage_path%", storage_path(), $override);
} else {
$correct_path_prefix = $originals[$disk] . "/$suffix/";
}
$this->assertSame($correct_path_prefix, $current_path_prefix);
}
}