1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 21:54:03 +00:00

Change setting to assertion, add comment

This commit is contained in:
lukinovec 2023-04-18 15:05:37 +02:00
parent b5abe6ef0f
commit cb07a47f18
2 changed files with 3 additions and 1 deletions

View file

@ -93,6 +93,7 @@ test('database data is separated', function () {
}); });
test('cache data is separated', function (string $bootstrapper) { test('cache data is separated', function (string $bootstrapper) {
// Make sure that the prefixed 'redis' cache driver is used
expect(config('cache.default'))->toBe('redis'); expect(config('cache.default'))->toBe('redis');
config([ config([

View file

@ -231,7 +231,8 @@ test('specific central cache store can be used inside a service', function () {
test('only the stores specified in tenantCacheStores get prefixed', function() { test('only the stores specified in tenantCacheStores get prefixed', function() {
// Make sure the currently used store ('redis') is the only store in $tenantCacheStores // Make sure the currently used store ('redis') is the only store in $tenantCacheStores
PrefixCacheTenancyBootstrapper::$tenantCacheStores = [$prefixedStore = 'redis']; expect(PrefixCacheTenancyBootstrapper::$tenantCacheStores)->toBe([$prefixedStore = 'redis']);
$centralValue = 'central-value'; $centralValue = 'central-value';
$assertStoreIsNotPrefixed = function (string $unprefixedStore) use ($prefixedStore, $centralValue) { $assertStoreIsNotPrefixed = function (string $unprefixedStore) use ($prefixedStore, $centralValue) {
// Switch to the unprefixed store // Switch to the unprefixed store