Code Duplication    Length = 11-12 lines in 3 locations

tests/SimpleCacheTest.php 3 locations

@@ 203-214 (lines=12) @@
200
        $this->assertFalse($this->cache->has('key1'));
201
    }
202
203
    public function testGet()
204
    {
205
        if (isset($this->skippedTests[__FUNCTION__])) {
206
            $this->markTestSkipped($this->skippedTests[__FUNCTION__]);
207
        }
208
209
        $this->assertNull($this->cache->get('key'));
210
        $this->assertEquals('foo', $this->cache->get('key', 'foo'));
211
212
        $this->cache->set('key', 'value');
213
        $this->assertEquals('value', $this->cache->get('key', 'foo'));
214
    }
215
216
    public function testDelete()
217
    {
@@ 216-226 (lines=11) @@
213
        $this->assertEquals('value', $this->cache->get('key', 'foo'));
214
    }
215
216
    public function testDelete()
217
    {
218
        if (isset($this->skippedTests[__FUNCTION__])) {
219
            $this->markTestSkipped($this->skippedTests[__FUNCTION__]);
220
        }
221
222
        $this->assertTrue($this->cache->delete('key'), 'Deleting a value that does not exist should return true');
223
        $this->cache->set('key', 'value');
224
        $this->assertTrue($this->cache->delete('key'), 'Delete must return true on success');
225
        $this->assertNull($this->cache->get('key'), 'Values must be deleted on delete()');
226
    }
227
228
    public function testClear()
229
    {
@@ 228-238 (lines=11) @@
225
        $this->assertNull($this->cache->get('key'), 'Values must be deleted on delete()');
226
    }
227
228
    public function testClear()
229
    {
230
        if (isset($this->skippedTests[__FUNCTION__])) {
231
            $this->markTestSkipped($this->skippedTests[__FUNCTION__]);
232
        }
233
234
        $this->assertTrue($this->cache->clear(), 'Clearing an empty cache should return true');
235
        $this->cache->set('key', 'value');
236
        $this->assertTrue($this->cache->clear(), 'Delete must return true on success');
237
        $this->assertNull($this->cache->get('key'), 'Values must be deleted on clear()');
238
    }
239
240
    public function testSetMultiple()
241
    {