Code Duplication    Length = 12-13 lines in 2 locations

test/unit/SimpleCacheAdapterTest.php 2 locations

@@ 95-106 (lines=12) @@
92
        new SimpleCacheAdapter($doctrineCache);
93
    }
94
95
    public function testGetProxiesToDoctrineFetch()
96
    {
97
        $key = uniqid('key', true);
98
        $value = uniqid('value', true);
99
100
        /** @var FullyImplementedCache|\PHPUnit_Framework_MockObject_MockObject $doctrineCache */
101
        $doctrineCache = $this->createMock(FullyImplementedCache::class);
102
        $doctrineCache->expects(self::once())->method('fetch')->with($key)->willReturn($value);
103
104
        $psrCache = new SimpleCacheAdapter($doctrineCache);
105
        self::assertSame($value, $psrCache->get($key));
106
    }
107
108
    public function testGetWithNotExistingKey()
109
    {
@@ 263-275 (lines=13) @@
260
     * @param mixed $key
261
     * @dataProvider validKeys
262
     */
263
    public function testGetMultipleAcceptsTraversable($key)
264
    {
265
        $values = [
266
            $key => uniqid('value', true),
267
        ];
268
269
        /** @var FullyImplementedCache|\PHPUnit_Framework_MockObject_MockObject $doctrineCache */
270
        $doctrineCache = $this->createMock(FullyImplementedCache::class);
271
        $doctrineCache->expects(self::once())->method('fetchMultiple')->with(array_keys($values))->willReturn($values);
272
273
        $psrCache = new SimpleCacheAdapter($doctrineCache);
274
        $psrCache->getMultiple(new \ArrayObject(array_keys($values)));
275
    }
276
277
    public function testGetMultipleAcceptsGenerator()
278
    {