Test Failed
Push — master ( b80e83...3e565e )
by Adam
03:58 queued 01:57
created

RedisCacheTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 1
cbo 2
dl 0
loc 20
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 9 2
A testCacheClear() 0 4 1
1
<?php
2
namespace DBAL\Tests\Caching;
3
4
use DBAL\Caching\RedisCache;
5
6
class RedisCacheTest extends CacheTest{
7
    
8
    protected $port = 6379;
9
    
10
    public function setUp() {
11
        if(!extension_loaded('redis')) {
12
            $this->markTestSkipped(
13
                'The Redis extension is not available.'
14
            );
15
        }
16
        $this->cache = new RedisCache();
17
        parent::setUp();
18
    }
19
    
20
    public function testCacheClear(){
21
        $this->cache->save('key1', 'testvalue', 60);
22
        $this->assertEquals(1, $this->cache->deleteAll());
23
    }
24
    
25
}
26