From 70ee83b3b73e8a62f7fde75d01bcfe8a3d9d11be Mon Sep 17 00:00:00 2001 From: Abrar Ahmad Date: Wed, 30 Nov 2022 13:27:15 +0500 Subject: [PATCH] fix test --- tests/PrefixCacheBootstrapperTest.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/PrefixCacheBootstrapperTest.php b/tests/PrefixCacheBootstrapperTest.php index e03c3dfe..09d7f6fb 100644 --- a/tests/PrefixCacheBootstrapperTest.php +++ b/tests/PrefixCacheBootstrapperTest.php @@ -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()); });