1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-04 19:24:02 +00:00

Add cache persistence test

This commit is contained in:
Samuel Štancl 2019-07-30 21:03:40 +02:00
parent d0d1f6930b
commit c3fea58e2b

View file

@ -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'));
}
}