mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 12:54:05 +00:00
[1.6.0] [WIP] Fix cache persistence (#79)
* Add cache persistence test * Change cache driver to redis
This commit is contained in:
parent
92ebc1f01b
commit
f34e1e97ac
2 changed files with 16 additions and 1 deletions
|
|
@ -73,4 +73,19 @@ class CacheManagerTest extends TestCase
|
|||
cache(['foo' => 'xyz'], 1);
|
||||
$this->assertSame('xyz', cache('foo'));
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function cache_is_persisted()
|
||||
{
|
||||
tenant()->create('foo.localhost');
|
||||
tenancy()->init('foo.localhost');
|
||||
|
||||
cache(['foo' => 'bar'], 10);
|
||||
$this->assertSame('bar', cache('foo'));
|
||||
|
||||
tenancy()->end();
|
||||
|
||||
tenancy()->init('foo.localhost');
|
||||
$this->assertSame('bar', cache('foo'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue