diff --git a/src/Bootstrappers/CacheTagBootstrapper.php b/src/Bootstrappers/CacheTaggingBootstrapper.php similarity index 78% rename from src/Bootstrappers/CacheTagBootstrapper.php rename to src/Bootstrappers/CacheTaggingBootstrapper.php index 73adf022..57a3502b 100644 --- a/src/Bootstrappers/CacheTagBootstrapper.php +++ b/src/Bootstrappers/CacheTaggingBootstrapper.php @@ -8,7 +8,10 @@ use Stancl\Tenancy\CacheManager; use Stancl\Tenancy\Contracts\TenancyBootstrapper; use Stancl\Tenancy\Contracts\Tenant; -class CacheTagBootstrapper implements TenancyBootstrapper +/** + * Separate tenant cache using tagging. + */ +class CacheTaggingBootstrapper implements TenancyBootstrapper { public function bootstrap(Tenant $tenant): void { diff --git a/tests/BootstrapperTest.php b/tests/BootstrapperTest.php index 70501def..af603479 100644 --- a/tests/BootstrapperTest.php +++ b/tests/BootstrapperTest.php @@ -28,7 +28,7 @@ use Stancl\Tenancy\Listeners\BootstrapTenancy; use Stancl\Tenancy\Tests\Etc\TestingBroadcaster; use Stancl\Tenancy\Listeners\DeleteTenantStorage; use Stancl\Tenancy\Listeners\RevertToCentralContext; -use Stancl\Tenancy\Bootstrappers\CacheTagBootstrapper; +use Stancl\Tenancy\Bootstrappers\CacheTaggingBootstrapper; use Stancl\Tenancy\Bootstrappers\UrlTenancyBootstrapper; use Stancl\Tenancy\Bootstrappers\MailTenancyBootstrapper; use Stancl\Tenancy\Bootstrappers\RedisTenancyBootstrapper; @@ -85,7 +85,7 @@ test('database data is separated', function () { test('cache data is separated', function () { config([ 'tenancy.bootstrappers' => [ - CacheTagBootstrapper::class, + CacheTaggingBootstrapper::class, ], 'cache.default' => 'redis', ]); diff --git a/tests/CacheManagerTest.php b/tests/CacheManagerTest.php index ff8a853b..b3930756 100644 --- a/tests/CacheManagerTest.php +++ b/tests/CacheManagerTest.php @@ -6,10 +6,10 @@ use Stancl\Tenancy\Tests\Etc\Tenant; use Illuminate\Support\Facades\Event; use Stancl\Tenancy\Events\TenancyInitialized; use Stancl\Tenancy\Listeners\BootstrapTenancy; -use Stancl\Tenancy\Bootstrappers\CacheTagBootstrapper; +use Stancl\Tenancy\Bootstrappers\CacheTaggingBootstrapper; beforeEach(function () { - config(['tenancy.bootstrappers' => [CacheTagBootstrapper::class]]); + config(['tenancy.bootstrappers' => [CacheTaggingBootstrapper::class]]); Event::listen(TenancyInitialized::class, BootstrapTenancy::class); }); diff --git a/tests/GlobalCacheTest.php b/tests/GlobalCacheTest.php index f59ea401..465d7bd7 100644 --- a/tests/GlobalCacheTest.php +++ b/tests/GlobalCacheTest.php @@ -9,10 +9,10 @@ use Stancl\Tenancy\Facades\GlobalCache; use Stancl\Tenancy\Events\TenancyInitialized; use Stancl\Tenancy\Listeners\BootstrapTenancy; use Stancl\Tenancy\Listeners\RevertToCentralContext; -use Stancl\Tenancy\Bootstrappers\CacheTagBootstrapper; +use Stancl\Tenancy\Bootstrappers\CacheTaggingBootstrapper; beforeEach(function () { - config(['tenancy.bootstrappers' => [CacheTagBootstrapper::class]]); + config(['tenancy.bootstrappers' => [CacheTaggingBootstrapper::class]]); Event::listen(TenancyInitialized::class, BootstrapTenancy::class); Event::listen(TenancyEnded::class, RevertToCentralContext::class);