mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 08:14:02 +00:00
Enable cache in the single test file
This commit is contained in:
parent
f2b057fd24
commit
a86412af09
1 changed files with 3 additions and 0 deletions
|
|
@ -20,6 +20,8 @@ class CachedResolverTest extends TestCase
|
||||||
if (config('tenancy.storage_driver') !== 'db') {
|
if (config('tenancy.storage_driver') !== 'db') {
|
||||||
$this->markTestSkipped('This test is only relevant for the DB storage driver.');
|
$this->markTestSkipped('This test is only relevant for the DB storage driver.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
config(['tenancy.storage_drivers.db.cache_store' => null]); // default driver
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @test */
|
/** @test */
|
||||||
|
|
@ -36,6 +38,7 @@ class CachedResolverTest extends TestCase
|
||||||
$this->assertSame($tenant->domains, $queried->domains);
|
$this->assertSame($tenant->domains, $queried->domains);
|
||||||
|
|
||||||
// cache is set
|
// 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->assertEquals($tenant->data, Cache::get('_tenancy_id_to_data:' . $tenant->id));
|
||||||
$this->assertSame($tenant->domains, Cache::get('_tenancy_id_to_domains:' . $tenant->id));
|
$this->assertSame($tenant->domains, Cache::get('_tenancy_id_to_domains:' . $tenant->id));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue