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

CouchbaseBucketCacheTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
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