Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3d9279e

Browse files
committed
Merge pull request laravel#2642 from karptonite/cache_tags_tests
Added missing tests for Tagged Caches
2 parents 9a4d5c9 + 53de542 commit 3d9279e

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

tests/Cache/CacheTaggedCacheTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,23 @@ public function testCacheSavedWithMultipleTagsCanBeFlushed()
4444
}
4545

4646

47+
public function testTagsWithStringArgument()
48+
{
49+
$store = new ArrayStore;
50+
$store->tags('bop')->put('foo', 'bar', 10);
51+
$this->assertEquals('bar', $store->tags('bop')->get('foo'));
52+
}
53+
54+
55+
public function testTagsCacheForever()
56+
{
57+
$store = new ArrayStore;
58+
$tags = array('bop', 'zap');
59+
$store->tags($tags)->forever('foo', 'bar');
60+
$this->assertEquals('bar', $store->tags($tags)->get('foo'));
61+
}
62+
63+
4764
public function testRedisCacheTagsPushForeverKeysCorrectly()
4865
{
4966
$store = m::mock('Illuminate\Cache\StoreInterface');

0 commit comments

Comments
 (0)