Skip to content

Commit 2c2bf9c

Browse files
committed
Fixed tests
1 parent e616fae commit 2c2bf9c

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/Illuminate/Cache/TagSet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function flush()
7171
*
7272
* @param string $name
7373
*/
74-
public function resetTag($name)
74+
public function flushTag($name)
7575
{
7676
$this->store->forget($this->tagKey($name));
7777
}

tests/Cache/CacheTaggedCacheTest.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,11 +282,20 @@ public function testRedisCacheTagsCanBeFlushed()
282282
$conn->shouldReceive('del')->once()->with('prefix:foo:standard_ref');
283283
$conn->shouldReceive('del')->once()->with('prefix:bar:standard_ref');
284284

285-
$tagSet->shouldReceive('reset')->once();
285+
$tagSet->shouldReceive('flush')->once();
286286

287287
$redis->flush();
288288
}
289289

290+
public function testTagFlushRemovesTag()
291+
{
292+
$store = new ArrayStore;
293+
$tags = ['bop'];
294+
$store->tags($tags)->put('foo', 'bar', 10);
295+
$store->tags($tags)->flush();
296+
$this->assertNull($store->get('tag:bop:key'));
297+
}
298+
290299
private function getTestCacheStoreWithTagValues(): ArrayStore
291300
{
292301
$store = new ArrayStore;

0 commit comments

Comments
 (0)