File tree 1 file changed +5
-7
lines changed
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 16
16
});
17
17
18
18
it ('will separate the cache prefix for each tenant ' , function () {
19
- $ originalPrefix = config ('cache.prefix ' ) ;
19
+ $ originalPrefix = config ('cache.prefix ' );
20
20
21
21
expect (app ('cache ' )->getPrefix ())->toStartWith ($ originalPrefix );
22
22
expect (app ('cache.store ' )->getPrefix ())->toStartWith ($ originalPrefix );
26
26
$ tenantOne ->makeCurrent ();
27
27
$ tenantOnePrefix = 'tenant_id_ ' . $ tenantOne ->id . ': ' ;
28
28
29
- expect ($ tenantOnePrefix )
30
- ->toEqual (app ('cache ' )->getPrefix ())
31
- ->toEqual (app ('cache.store ' )->getPrefix ());
29
+ expect (app ('cache ' )->getPrefix ())->toStartWith ($ tenantOnePrefix );
30
+ expect (app ('cache.store ' )->getPrefix ())->toStartWith ($ tenantOnePrefix );
32
31
33
32
/** @var \Spatie\Multitenancy\Models\Tenant $tenantOne */
34
33
$ tenantTwo = Tenant::factory ()->create ();
35
34
$ tenantTwo ->makeCurrent ();
36
35
$ tenantTwoPrefix = 'tenant_id_ ' . $ tenantTwo ->id . ': ' ;
37
36
38
- expect ($ tenantTwoPrefix )
39
- ->toEqual (app ('cache ' )->getPrefix ())
40
- ->toEqual (app ('cache.store ' )->getPrefix ());
37
+ expect (app ('cache ' )->getPrefix ())->toStartWith ($ tenantTwoPrefix );
38
+ expect (app ('cache.store ' )->getPrefix ())->toStartWith ($ tenantTwoPrefix );
41
39
});
42
40
43
41
it ('will separate the cache for each tenant ' , function () {
You can’t perform that action at this time.
0 commit comments