Code Duplication    Length = 8-10 lines in 2 locations

tests/SimpleCacheTest.php 2 locations

@@ 327-334 (lines=8) @@
324
        $this->cache->set('key3', 'value');
325
        $result = $this->cache->getMultiple(['key2', 'key3', 'key4'], 'foo');
326
        $keys   = [];
327
        foreach ($result as $key => $r) {
328
            $keys[] = $key;
329
            if ($key === 'key3') {
330
                $this->assertEquals('value', $r);
331
            } else {
332
                $this->assertEquals('foo', $r);
333
            }
334
        }
335
        sort($keys);
336
        $this->assertSame(['key2', 'key3', 'key4'], $keys);
337
    }
@@ 353-362 (lines=10) @@
350
        $this->cache->set('key0', 'value0');
351
        $result = $this->cache->getMultiple($gen());
352
        $keys   = [];
353
        foreach ($result as $key => $r) {
354
            $keys[] = $key;
355
            if ($key === 'key0') {
356
                $this->assertEquals('value0', $r);
357
            } elseif ($key === 'key1') {
358
                $this->assertNull($r);
359
            } else {
360
                $this->assertFalse(true, 'This should not happend');
361
            }
362
        }
363
        sort($keys);
364
        $this->assertSame(['key0', 'key1'], $keys);
365
        $this->assertEquals('value0', $this->cache->get('key0'));