Skip to content

Commit 4c107d9

Browse files
committed
Update the tagging integration tests to support the new API
1 parent 4a046c4 commit 4c107d9

File tree

2 files changed

+70
-255
lines changed

2 files changed

+70
-255
lines changed

src/HierarchicalCachePoolTest.php

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -65,26 +65,6 @@ public function testBasicUsage()
6565
$this->assertFalse($this->cache->hasItem('|users|4711|followers|4|likes'));
6666
}
6767

68-
public function testBasicUsageWithTags()
69-
{
70-
if (isset($this->skippedTests[__FUNCTION__])) {
71-
$this->markTestSkipped($this->skippedTests[__FUNCTION__]);
72-
73-
return;
74-
}
75-
76-
$user = 4711;
77-
for ($i = 0; $i < 10; $i++) {
78-
$item = $this->cache->getItem(sprintf('|users|%d|followers|%d|likes', $user, $i), ['user']);
79-
$item->set('Justin Bieber');
80-
$this->cache->save($item);
81-
}
82-
83-
$this->assertTrue($this->cache->hasItem('|users|4711|followers|4|likes', ['user']));
84-
$this->cache->deleteItem('|users|4711|followers', ['user']);
85-
$this->assertFalse($this->cache->hasItem('|users|4711|followers|4|likes', ['user']));
86-
}
87-
8868
public function testChain()
8969
{
9070
if (isset($this->skippedTests[__FUNCTION__])) {
@@ -129,31 +109,6 @@ public function testChain()
129109
$this->assertFalse($this->cache->hasItem('|aaa|bbb|zzz|ddd'));
130110
}
131111

132-
public function testTagRemoval()
133-
{
134-
if (isset($this->skippedTests[__FUNCTION__])) {
135-
$this->markTestSkipped($this->skippedTests[__FUNCTION__]);
136-
137-
return;
138-
}
139-
140-
$item = $this->cache->getItem('|aaa|bbb', ['tag1']);
141-
$item->set('value');
142-
$this->cache->save($item);
143-
144-
$this->cache->deleteItem('|aaa|bbb', ['tag2']);
145-
$this->assertTrue($this->cache->hasItem('|aaa|bbb', ['tag1']));
146-
147-
$this->cache->deleteItem('|aaa|bbb');
148-
$this->assertTrue($this->cache->hasItem('|aaa|bbb', ['tag1']));
149-
150-
$this->cache->deleteItem('|aaa', ['tag2']);
151-
$this->assertTrue($this->cache->hasItem('|aaa|bbb', ['tag1']));
152-
153-
$this->cache->deleteItem('|aaa');
154-
$this->assertTrue($this->cache->hasItem('|aaa|bbb', ['tag1']));
155-
}
156-
157112
public function testRemoval()
158113
{
159114
if (isset($this->skippedTests[__FUNCTION__])) {

0 commit comments

Comments
 (0)