Code Duplication    Length = 8-9 lines in 2 locations

Tests/RedisLockStrategyTest.php 2 locations

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