1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 15:54:03 +00:00

Make CacheService a singleton in a test

This commit is contained in:
lukinovec 2023-01-05 16:37:43 +01:00
parent b38aee0a6a
commit 5ea5299ed1

View file

@ -209,6 +209,8 @@ test('stores specified in tenantCacheStores get prefixed', function() {
// Make the currently used store ('redis') the only store in $tenantCacheStores
PrefixCacheTenancyBootstrapper::$tenantCacheStores = ['redis'];
$this->app->singleton(CacheService::class);
app()->make(CacheService::class)->handle();
expect(cache('key'))->toBe($centralValue = 'central-value');