Code Duplication    Length = 8-9 lines in 2 locations

Tests/RedisLockStrategyTest.php 2 locations

@@ 91-98 (lines=8) @@
88
     * @expectedException \TYPO3\CMS\Core\Locking\Exception\LockCreateException
89
     * @expectedExceptionMessage no database for redis lock strategy found
90
     */
91
    public function shouldThrowExceptionBecauseConfigHasNoDatabase()
92
    {
93
        $GLOBALS['TYPO3_CONF_VARS']['SYS']['redis_lock'] = [
94
            'host' => $this->redisHost,
95
        ];
96
97
        $this->lockFactory->createLocker('test');
98
    }
99
100
    /**
101
     * @test
@@ 254-262 (lines=9) @@
251
     *
252
     * @return \TYPO3\CMS\Core\Locking\LockingStrategyInterface
253
     */
254
    private function getLocker($id)
255
    {
256
        $GLOBALS['TYPO3_CONF_VARS']['SYS']['redis_lock'] = [
257
            'host'     => $this->redisHost,
258
            'database' => $this->redisDatabase,
259
        ];
260
261
        return $this->lockFactory->createLocker($id);
262
    }
263
264
}
265