Code Duplication    Length = 20-20 lines in 2 locations

eZ/Publish/Core/Persistence/Legacy/Tests/User/UserHandlerTest.php 2 locations

@@ 182-201 (lines=20) @@
179
        );
180
    }
181
182
    public function testUpdateUserToken()
183
    {
184
        $handler = $this->getUserHandler();
185
186
        $handler->updateUserToken($userToken = $this->getValidUserToken(1234567890));
187
188
        $this->assertQueryResult(
189
            [['0800fc577294c34e0b28ad2839435945', 1, 1234567890, 42]],
190
            $this->handler->createSelectQuery()->select('*')->from('ezuser_accountkey'),
191
            'Expected user data to be updated.'
192
        );
193
194
        $handler->updateUserToken($userToken = $this->getValidUserToken(2234567890));
195
196
        $this->assertQueryResult(
197
            [['0800fc577294c34e0b28ad2839435945', 1, 2234567890, 42]],
198
            $this->handler->createSelectQuery()->select('*')->from('ezuser_accountkey'),
199
            'Expected user token data to be updated.'
200
        );
201
    }
202
203
    public function testExpireUserToken()
204
    {
@@ 203-222 (lines=20) @@
200
        );
201
    }
202
203
    public function testExpireUserToken()
204
    {
205
        $handler = $this->getUserHandler();
206
207
        $handler->updateUserToken($userToken = $this->getValidUserToken(1234567890));
208
209
        $this->assertQueryResult(
210
            [['0800fc577294c34e0b28ad2839435945', 1, 1234567890, 42]],
211
            $this->handler->createSelectQuery()->select('*')->from('ezuser_accountkey'),
212
            'Expected user data to be updated.'
213
        );
214
215
        $handler->expireUserToken($userToken->hashKey);
216
217
        $this->assertQueryResult(
218
            [['0800fc577294c34e0b28ad2839435945', 1, 0, 42]],
219
            $this->handler->createSelectQuery()->select('*')->from('ezuser_accountkey'),
220
            'Expected user token to be expired.'
221
        );
222
    }
223
224
    public function testCreateAndDeleteUser()
225
    {