Completed
Push — migrate-files-no-interaction ( 025687...608925 )
by
unknown
46:43 queued 18:48
created

__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * File containing the CacheServiceDecorator 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\Helpers;
10
11
use eZ\Publish\Core\Persistence\Cache\CacheServiceDecorator;
12
use Stash\Pool;
13
use Stash\Driver\Ephemeral;
14
15
/**
16
 * Class CacheServiceDecorator.
17
 *
18
 * Wraps the Cache Service for Spi cache to apply key prefix for the cache
19
 */
20
class IntegrationTestCacheServiceDecorator extends CacheServiceDecorator
21
{
22
    /**
23
     * Constructs the cache service decorator.
24
     */
25
    public function __construct()
26
    {
27
        $this->cachePool = new Pool(new Ephemeral());
28
    }
29
30
    /**
31
     * Private function for integration test runner to clear data between tests.
32
     */
33
    public function clearAllTestData()
34
    {
35
        $this->cachePool->clear();
36
    }
37
}
38