Completed
Push — master ( 5a5e00...cf2997 )
by Marco
11:54 queued 03:51
created

CouchbaseBucketCacheTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 1
cbo 2
dl 0
loc 16
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 5 1
A _getCacheDriver() 0 4 1
1
<?php
2
3
namespace Doctrine\Tests\Common\Cache;
4
5
use Couchbase\Bucket;
6
use Couchbase\Cluster;
7
use Doctrine\Common\Cache\CacheProvider;
8
use Doctrine\Common\Cache\CouchbaseBucketCache;
9
10
/**
11
 * @requires extension couchbase >=2.3
12
 */
13
class CouchbaseBucketCacheTest extends CacheTest
14
{
15
    /** @var Bucket */
16
    private $bucket;
17
18
    protected function setUp() : void
19
    {
20
        $cluster      = new Cluster('couchbase://localhost?detailed_errcodes=1');
21
        $this->bucket = $cluster->openBucket('default');
22
    }
23
24
    protected function _getCacheDriver() : CacheProvider
25
    {
26
        return new CouchbaseBucketCache($this->bucket);
27
    }
28
}
29