From 5ea5299ed15e5012a30b49497585c0fc65c06885 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Thu, 5 Jan 2023 16:37:43 +0100 Subject: [PATCH] Make CacheService a singleton in a test --- tests/PrefixCacheBootstrapperTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/PrefixCacheBootstrapperTest.php b/tests/PrefixCacheBootstrapperTest.php index e7fe4b50..c02a0b0d 100644 --- a/tests/PrefixCacheBootstrapperTest.php +++ b/tests/PrefixCacheBootstrapperTest.php @@ -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');