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

Set cache.default in beforeEach

This commit is contained in:
lukinovec 2023-04-17 12:36:59 +02:00
parent 0c1912b9c5
commit 13b85a2d3b

View file

@ -42,7 +42,8 @@ use Stancl\Tenancy\CacheManager;
beforeEach(function () {
$this->mockConsoleOutput = false;
CacheManager::$addTags = false;
PrefixCacheTenancyBootstrapper::$tenantCacheStores = ['redis'];
config(['cache.default' => $cacheDriver = 'redis']);
PrefixCacheTenancyBootstrapper::$tenantCacheStores = [$cacheDriver];
Event::listen(
TenantCreated::class,
@ -92,9 +93,10 @@ test('database data is separated', function () {
});
test('cache data is separated', function (string $bootstrapper) {
expect(config('cache.default'))->toBe('redis');
config([
'tenancy.bootstrappers' => [$bootstrapper],
'cache.default' => 'redis',
]);
$tenant1 = Tenant::create();