mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 14:14:04 +00:00
add assertion, update todos
This commit is contained in:
parent
20c1b9a940
commit
630f404227
2 changed files with 3 additions and 1 deletions
|
|
@ -40,7 +40,6 @@ class FilesystemTenancyBootstrapper implements TenancyBootstrapper
|
||||||
$this->forgetDisks();
|
$this->forgetDisks();
|
||||||
$this->scopeCache($suffix);
|
$this->scopeCache($suffix);
|
||||||
$this->scopeSessions($suffix);
|
$this->scopeSessions($suffix);
|
||||||
// todo@docs update fs docs
|
|
||||||
|
|
||||||
foreach ($this->app['config']['tenancy.filesystem.disks'] as $disk) {
|
foreach ($this->app['config']['tenancy.filesystem.disks'] as $disk) {
|
||||||
$this->diskRoot($disk, $tenant);
|
$this->diskRoot($disk, $tenant);
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,8 @@ use Stancl\Tenancy\Middleware\InitializeTenancyByPath;
|
||||||
use Stancl\Tenancy\Middleware\PreventAccessFromUnwantedDomains;
|
use Stancl\Tenancy\Middleware\PreventAccessFromUnwantedDomains;
|
||||||
use Stancl\Tenancy\Tests\Etc\Tenant;
|
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 () {
|
beforeEach(function () {
|
||||||
Event::listen(TenancyInitialized::class, BootstrapTenancy::class);
|
Event::listen(TenancyInitialized::class, BootstrapTenancy::class);
|
||||||
Event::listen(TenancyEnded::class, RevertToCentralContext::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');
|
$allApcuKeys = fn () => array_column(apcu_cache_info()['cache_list'], 'info');
|
||||||
|
expect($allApcuKeys())->toHaveCount(0);
|
||||||
|
|
||||||
$tenant = Tenant::create();
|
$tenant = Tenant::create();
|
||||||
Route::middleware(StartSession::class, InitializeTenancyByPath::class)->get('/{tenant}/foo', fn () => 'bar');
|
Route::middleware(StartSession::class, InitializeTenancyByPath::class)->get('/{tenant}/foo', fn () => 'bar');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue