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

Disable cache tagging by default, add CacheTagBootstrapper

This commit is contained in:
lukinovec 2023-04-11 14:28:28 +02:00
parent 5849afa4c8
commit 7ebfc375d6
5 changed files with 31 additions and 12 deletions

View file

@ -2,16 +2,17 @@
declare(strict_types=1);
use Stancl\Tenancy\Tests\Etc\Tenant;
use Illuminate\Support\Facades\Event;
use Stancl\Tenancy\Events\TenancyEnded;
use Stancl\Tenancy\Events\TenancyInitialized;
use Stancl\Tenancy\Facades\GlobalCache;
use Stancl\Tenancy\Events\TenancyInitialized;
use Stancl\Tenancy\Listeners\BootstrapTenancy;
use Stancl\Tenancy\Listeners\RevertToCentralContext;
use Stancl\Tenancy\Tests\Etc\Tenant;
use Stancl\Tenancy\Bootstrappers\CacheTagBootstrapper;
beforeEach(function () {
config(['tenancy.bootstrappers' => []]);
config(['tenancy.bootstrappers' => [CacheTagBootstrapper::class]]);
Event::listen(TenancyInitialized::class, BootstrapTenancy::class);
Event::listen(TenancyEnded::class, RevertToCentralContext::class);