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

Fix #31 CacheManager didn't merge tags properly; write tests for CacheManager

This commit is contained in:
Samuel Štancl 2019-02-13 17:13:01 +01:00
parent e463829e53
commit a2d68b1261
3 changed files with 31 additions and 10 deletions

View file

@ -65,8 +65,10 @@ class BootstrapsTenancyTest extends TestCase
/** @test */
public function cache_is_tagged()
{
$this->markTestIncomplete('see BootstrapsTenancyTest@cache_is_tagged');
// todo check that tags are set
// doesn't seem to be possible right now? can't find a way to get TaggedCache's tags
$this->assertSame(['foo'], cache()->tags('foo')->getTags()->getNames());
$this->initTenancy();
$expected = [config('tenancy.cache.tag_base') . tenant('uuid'), 'foo', 'bar'];
$this->assertEquals($expected, cache()->tags(['foo', 'bar'])->getTags()->getNames());
}
}