mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 14:34:04 +00:00
Make tenancy()->init() statements more specific
This commit is contained in:
parent
0c724ca2a0
commit
08f6db4ffe
1 changed files with 8 additions and 4 deletions
|
|
@ -41,12 +41,14 @@ class CacheManagerTest extends TestCase
|
|||
/** @test */
|
||||
public function tags_separate_cache_well_enough()
|
||||
{
|
||||
tenant()->create('foo.localhost');
|
||||
tenancy()->init('foo.localhost');
|
||||
cache()->put('foo', 'bar', 1);
|
||||
|
||||
$this->assertSame('bar', cache()->get('foo'));
|
||||
|
||||
tenant()->create('foo.localhost');
|
||||
tenancy()->init();
|
||||
tenant()->create('bar.localhost');
|
||||
tenancy()->init('bar.localhost');
|
||||
|
||||
$this->assertNotSame('bar', cache()->get('foo'));
|
||||
|
||||
|
|
@ -58,12 +60,14 @@ class CacheManagerTest extends TestCase
|
|||
/** @test */
|
||||
public function invoking_the_cache_helper_works()
|
||||
{
|
||||
tenant()->create('foo.localhost');
|
||||
tenancy()->init('foo.localhost');
|
||||
cache(['foo' => 'bar'], 1);
|
||||
|
||||
$this->assertSame('bar', cache('foo'));
|
||||
|
||||
tenant()->create('foo.localhost');
|
||||
tenancy()->init();
|
||||
tenant()->create('bar.localhost');
|
||||
tenancy()->init('bar.localhost');
|
||||
|
||||
$this->assertNotSame('bar', cache('foo'));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue