Completed
Push — master ( e91e9a...b4b292 )
by Alexander
01:49
created

ApcuCacheTest::testExpire()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
namespace Yiisoft\Cache\Tests;
3
4
use Yiisoft\Cache\ApcuCache;
5
use Yiisoft\Cache\Cache;
6
use Yiisoft\Cache\CacheInterface;
7
8
/**
9
 * Class for testing APC cache backend
10
 * @group apc
11
 * @group caching
12
 */
13
class ApcuCacheTest extends CacheTest
14
{
15
    public static function setUpBeforeClass(): void
16
    {
17
        if (!extension_loaded('apcu')) {
18
            self::markTestSkipped('Required extension "apcu" is not loaded');
19
        }
20
21
        if (!ini_get('apc.enable_cli')) {
22
            self::markTestSkipped('APC is installed but not enabled. Enable with "apc.enable_cli" from php.ini. Skipping.');
23
        }
24
    }
25
26
    protected function createCacheInstance(): CacheInterface
27
    {
28
        return new Cache(new ApcuCache());
29
    }
30
31
    public function testExpire(): void
32
    {
33
        $this->markTestSkipped('APC keys are expiring only on the next request.');
34
    }
35
36
    public function testExpireAdd(): void
37
    {
38
        $this->markTestSkipped('APC keys are expiring only on the next request.');
39
    }
40
}
41