Code Duplication    Length = 12-13 lines in 2 locations

test/unit/SimpleCacheAdapterTest.php 2 locations

@@ 76-87 (lines=12) @@
73
        new SimpleCacheAdapter($doctrineCache);
74
    }
75
76
    public function testGetProxiesToDoctrineFetch()
77
    {
78
        $key = uniqid('key', true);
79
        $value = uniqid('value', true);
80
81
        /** @var FullyImplementedCache|\PHPUnit_Framework_MockObject_MockObject $doctrineCache */
82
        $doctrineCache = $this->createMock(FullyImplementedCache::class);
83
        $doctrineCache->expects(self::once())->method('fetch')->with($key)->willReturn($value);
84
85
        $psrCache = new SimpleCacheAdapter($doctrineCache);
86
        self::assertSame($value, $psrCache->get($key));
87
    }
88
89
    public function testGetWithNotExistingKey()
90
    {
@@ 244-256 (lines=13) @@
241
     * @param mixed $key
242
     * @dataProvider validKeys
243
     */
244
    public function testGetMultipleAcceptsTraversable($key)
245
    {
246
        $values = [
247
            $key => uniqid('value', true),
248
        ];
249
250
        /** @var FullyImplementedCache|\PHPUnit_Framework_MockObject_MockObject $doctrineCache */
251
        $doctrineCache = $this->createMock(FullyImplementedCache::class);
252
        $doctrineCache->expects(self::once())->method('fetchMultiple')->with(array_keys($values))->willReturn($values);
253
254
        $psrCache = new SimpleCacheAdapter($doctrineCache);
255
        $psrCache->getMultiple(new \ArrayObject(array_keys($values)));
256
    }
257
258
    public function testGetMultipleAcceptsGenerator()
259
    {