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

Enable cache in the single test file

This commit is contained in:
Samuel Štancl 2020-03-14 19:22:08 +01:00
parent f2b057fd24
commit a86412af09

View file

@ -20,6 +20,8 @@ class CachedResolverTest extends TestCase
if (config('tenancy.storage_driver') !== 'db') {
$this->markTestSkipped('This test is only relevant for the DB storage driver.');
}
config(['tenancy.storage_drivers.db.cache_store' => null]); // default driver
}
/** @test */
@ -36,6 +38,7 @@ class CachedResolverTest extends TestCase
$this->assertSame($tenant->domains, $queried->domains);
// cache is set
$this->assertEquals($tenant->id, Cache::get('_tenancy_domain_to_id:foo.localhost'));
$this->assertEquals($tenant->data, Cache::get('_tenancy_id_to_data:' . $tenant->id));
$this->assertSame($tenant->domains, Cache::get('_tenancy_id_to_domains:' . $tenant->id));