From c3e3a33ed0a02fdb182007dbfa9efb76078adda2 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Wed, 1 Feb 2023 11:51:28 +0100 Subject: [PATCH] Fix test --- tests/PrefixCacheBootstrapperTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/PrefixCacheBootstrapperTest.php b/tests/PrefixCacheBootstrapperTest.php index 0ca5f899..86559c23 100644 --- a/tests/PrefixCacheBootstrapperTest.php +++ b/tests/PrefixCacheBootstrapperTest.php @@ -78,8 +78,11 @@ test('correct cache prefix is used in all contexts', function () { $expectPrefixToBe($tenantTwoPrefix); - // Assert tenants' data is accessible using the prefix from the central context tenancy()->end(); + // Prefix gets reverted to default after ending tenancy + tenancy()->end(); + $expectPrefixToBe($originalPrefix); + // Assert tenant's data is accessible using the prefix from the central context config(['cache.prefix' => null]); // stop prefixing cache keys in central so we can provide prefix manually app('cache')->forgetDriver(config('cache.default'));