From 630f404227db2b0903e9cae33b91d866f4904963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Wed, 10 Apr 2024 03:35:57 +0200 Subject: [PATCH] add assertion, update todos --- src/Bootstrappers/FilesystemTenancyBootstrapper.php | 1 - tests/SessionSeparationTest.php | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Bootstrappers/FilesystemTenancyBootstrapper.php b/src/Bootstrappers/FilesystemTenancyBootstrapper.php index e66bc654..ab7dc856 100644 --- a/src/Bootstrappers/FilesystemTenancyBootstrapper.php +++ b/src/Bootstrappers/FilesystemTenancyBootstrapper.php @@ -40,7 +40,6 @@ class FilesystemTenancyBootstrapper implements TenancyBootstrapper $this->forgetDisks(); $this->scopeCache($suffix); $this->scopeSessions($suffix); - // todo@docs update fs docs foreach ($this->app['config']['tenancy.filesystem.disks'] as $disk) { $this->diskRoot($disk, $tenant); diff --git a/tests/SessionSeparationTest.php b/tests/SessionSeparationTest.php index 9ac22a7d..6706a18e 100644 --- a/tests/SessionSeparationTest.php +++ b/tests/SessionSeparationTest.php @@ -24,6 +24,8 @@ use Stancl\Tenancy\Middleware\InitializeTenancyByPath; use Stancl\Tenancy\Middleware\PreventAccessFromUnwantedDomains; use Stancl\Tenancy\Tests\Etc\Tenant; +// todo@tests write similar low-level tests for the cache bootstrapper? including the database driver in a single-db setup + beforeEach(function () { Event::listen(TenancyInitialized::class, BootstrapTenancy::class); Event::listen(TenancyEnded::class, RevertToCentralContext::class); @@ -192,6 +194,7 @@ test('apc sessions are separated using the cache bootstrapper', function (bool $ ]); $allApcuKeys = fn () => array_column(apcu_cache_info()['cache_list'], 'info'); + expect($allApcuKeys())->toHaveCount(0); $tenant = Tenant::create(); Route::middleware(StartSession::class, InitializeTenancyByPath::class)->get('/{tenant}/foo', fn () => 'bar');