1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 17:24:03 +00:00
This commit is contained in:
Abrar Ahmad 2022-11-30 13:27:15 +05:00
parent 3407faf811
commit 70ee83b3b7

View file

@ -105,14 +105,17 @@ test('central cache is persisted', function () {
});
test('cache base prefix is customizable', function () {
$originalPrefix = config('cache.prefix');
$prefixBase = 'custom_';
config([
'tenancy.cache.prefix_base' => 'custom_'
'tenancy.cache.prefix_base' => $prefixBase
]);
$tenant1 = Tenant::create();
tenancy()->initialize($tenant1);
expect('custom_' . $tenant1->id . ':')
expect($originalPrefix . $prefixBase . $tenant1->getTenantKey() . ':')
->toBe(app('cache')->getPrefix())
->toBe(app('cache.store')->getPrefix());
});