1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-13 00:14:04 +00:00

Fix tests

This commit is contained in:
Samuel Štancl 2019-07-30 22:04:10 +02:00
parent f34e1e97ac
commit 2757e8f76c
3 changed files with 20 additions and 1 deletions

View file

@ -88,4 +88,21 @@ class CacheManagerTest extends TestCase
tenancy()->init('foo.localhost');
$this->assertSame('bar', cache('foo'));
}
/** @test */
public function cache_is_persisted_when_reidentification_is_used()
{
tenant()->create('foo.localhost');
tenant()->create('bar.localhost');
tenancy()->init('foo.localhost');
cache(['foo' => 'bar'], 10);
$this->assertSame('bar', cache('foo'));
tenancy()->init('bar.localhost');
tenancy()->end();
tenancy()->init('foo.localhost');
$this->assertSame('bar', cache('foo'));
}
}