mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 21:24:04 +00:00
Add cache persistence test
This commit is contained in:
parent
d0d1f6930b
commit
c3fea58e2b
1 changed files with 15 additions and 0 deletions
|
|
@ -73,4 +73,19 @@ class CacheManagerTest extends TestCase
|
||||||
cache(['foo' => 'xyz'], 1);
|
cache(['foo' => 'xyz'], 1);
|
||||||
$this->assertSame('xyz', cache('foo'));
|
$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