Code Duplication    Length = 13-13 lines in 2 locations

eZ/Publish/Core/Persistence/Cache/Tests/AbstractCacheHandlerTest.php 2 locations

@@ 87-99 (lines=13) @@
84
85
        $this->loggerMock->expects($this->never())->method('logCall');
86
87
        if ($multi) {
88
            $this->cacheMock
89
                ->expects($this->once())
90
                ->method('getItems')
91
                ->with([$cacheItem->getKey()])
92
                ->willReturn([$key => $cacheItem]);
93
        } else {
94
            $this->cacheMock
95
                ->expects($this->once())
96
                ->method('getItem')
97
                ->with($cacheItem->getKey())
98
                ->willReturn($cacheItem);
99
        }
100
101
        $this->persistenceHandlerMock
102
            ->expects($this->never())
@@ 134-146 (lines=13) @@
131
132
        $this->loggerMock->expects($this->once())->method('logCall');
133
134
        if ($multi) {
135
            $this->cacheMock
136
                ->expects($this->once())
137
                ->method('getItems')
138
                ->with([$cacheItem->getKey()])
139
                ->willReturn([$key => $cacheItem]);
140
        } else {
141
            $this->cacheMock
142
                ->expects($this->once())
143
                ->method('getItem')
144
                ->with($cacheItem->getKey())
145
                ->willReturn($cacheItem);
146
        }
147
148
        $innerHandlerMock = $this->getMock($this->getHandlerClassName());
149
        $this->persistenceHandlerMock