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:
parent
0c1912b9c5
commit
13b85a2d3b
1 changed files with 4 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue