Completed
Push — ezp-28439 ( 358b75...46de11 )
by
unknown
30:47 queued 12:40
created

TrashHandlerTest::testRecover()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 52
Code Lines 38

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 38
nc 1
nop 0
dl 0
loc 52
rs 9.4929
c 0
b 0
f 0

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
/**
4
 * File contains Test class.
5
 *
6
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
7
 * @license For full copyright and license information view LICENSE file distributed with this source code.
8
 */
9
namespace eZ\Publish\Core\Persistence\Cache\Tests;
10
11
use eZ\Publish\SPI\Persistence\Content\Location\Trash\Handler as TrashHandler;
12
13
/**
14
 * Test case for Persistence\Cache\SectionHandler.
15
 */
16
class TrashHandlerTest extends AbstractCacheHandlerTest
17
{
18
    public function getHandlerMethodName(): string
19
    {
20
        return 'trashHandler';
21
    }
22
23
    public function getHandlerClassName(): string
24
    {
25
        return TrashHandler::class;
26
    }
27
28
    public function providerForUnCachedMethods(): array
29
    {
30
        // string $method, array $arguments, array? $tags, string? $key
31
        return [
32
            ['loadTrashItem', [6]],
33
            ['trashSubtree', [6], ['location-6', 'location-path-6']],
34
            ['recover', [6, 2], ['location-6', 'location-path-6']],
35
            ['emptyTrash', []],
36
            ['deleteTrashItem', [6]],
37
        ];
38
    }
39
40
    public function providerForCachedLoadMethods(): array
41
    {
42
        // string $method, array $arguments, string $key, mixed? $data
43
        return [
44
        ];
45
    }
46
}
47