From 4b5554dcac5e1712ca494efea0bc697e2b5fd3f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Fri, 27 Sep 2019 22:35:59 +0200 Subject: [PATCH] Fix issues with bootstrappers' state --- src/TenancyBootstrappers/FilesystemTenancyBootstrapper.php | 2 -- tests/TestCase.php | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TenancyBootstrappers/FilesystemTenancyBootstrapper.php b/src/TenancyBootstrappers/FilesystemTenancyBootstrapper.php index 9ab612b0..b08a79e2 100644 --- a/src/TenancyBootstrappers/FilesystemTenancyBootstrapper.php +++ b/src/TenancyBootstrappers/FilesystemTenancyBootstrapper.php @@ -75,7 +75,5 @@ class FilesystemTenancyBootstrapper implements TenancyBootstrapper foreach ($this->app['config']['tenancy.filesystem.disks'] as $disk) { Storage::disk($disk)->getAdapter()->setPathPrefix($this->originalPaths['disks'][$disk]); } - - $this->originalPaths = []; } } diff --git a/tests/TestCase.php b/tests/TestCase.php index e09a13d8..3fff0a14 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -103,6 +103,8 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase 'tenancy.bootstrappers.redis' => \Stancl\Tenancy\TenancyBootstrappers\RedisTenancyBootstrapper::class, ]); + $app->singleton(\Stancl\Tenancy\TenancyBootstrappers\RedisTenancyBootstrapper::class); + if (env('TENANCY_TEST_STORAGE_DRIVER', 'redis') === 'redis') { $app['config']->set([ 'tenancy.storage_driver' => RedisStorageDriver::class,