Code Duplication    Length = 12-13 lines in 2 locations

test/unit/SimpleCacheAdapterTest.php 2 locations

@@ 253-265 (lines=13) @@
250
     * @param mixed $key
251
     * @dataProvider validKeys
252
     */
253
    public function testGetMultipleAcceptsTraversable($key)
254
    {
255
        $values = [
256
            $key => uniqid('value', true),
257
        ];
258
259
        /** @var FullyImplementedCache|\PHPUnit_Framework_MockObject_MockObject $doctrineCache */
260
        $doctrineCache = $this->createMock(FullyImplementedCache::class);
261
        $doctrineCache->expects(self::once())->method('fetchMultiple')->with(array_keys($values))->willReturn($values);
262
263
        $psrCache = new SimpleCacheAdapter($doctrineCache);
264
        $psrCache->getMultiple(new \ArrayObject(array_keys($values)));
265
    }
266
267
    public function testGetMultipleAcceptsGenerator()
268
    {
@@ 85-96 (lines=12) @@
82
        new SimpleCacheAdapter($doctrineCache);
83
    }
84
85
    public function testGetProxiesToDoctrineFetch()
86
    {
87
        $key = uniqid('key', true);
88
        $value = uniqid('value', true);
89
90
        /** @var FullyImplementedCache|\PHPUnit_Framework_MockObject_MockObject $doctrineCache */
91
        $doctrineCache = $this->createMock(FullyImplementedCache::class);
92
        $doctrineCache->expects(self::once())->method('fetch')->with($key)->willReturn($value);
93
94
        $psrCache = new SimpleCacheAdapter($doctrineCache);
95
        self::assertSame($value, $psrCache->get($key));
96
    }
97
98
    public function testGetWithNotExistingKey()
99
    {