mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 20:14:03 +00:00
Change setting to assertion, add comment
This commit is contained in:
parent
b5abe6ef0f
commit
cb07a47f18
2 changed files with 3 additions and 1 deletions
|
|
@ -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([
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue