| 1 | <?php |
||
| 17 | class RiakCacheTest extends CacheTest |
||
| 18 | { |
||
| 19 | /** @var Connection */ |
||
| 20 | private $connection; |
||
| 21 | |||
| 22 | /** @var Bucket */ |
||
| 23 | private $bucket; |
||
| 24 | |||
| 25 | protected function setUp() : void |
||
| 26 | { |
||
| 27 | try { |
||
| 28 | $this->connection = new Connection('127.0.0.1', 8087); |
||
| 29 | $this->bucket = new Bucket($this->connection, 'test'); |
||
| 30 | } catch (Exception\RiakException $e) { |
||
| 31 | $this->markTestSkipped('Cannot connect to Riak.'); |
||
| 32 | } |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * {@inheritdoc} |
||
| 37 | */ |
||
| 38 | public function testGetStats() : void |
||
| 39 | { |
||
| 40 | $cache = $this->_getCacheDriver(); |
||
| 41 | $stats = $cache->getStats(); |
||
| 42 | |||
| 43 | self::assertNull($stats); |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Retrieve RiakCache instance. |
||
| 48 | */ |
||
| 49 | protected function _getCacheDriver() : CacheProvider |
||
| 50 | { |
||
| 51 | return new RiakCache($this->bucket); |
||
| 52 | } |
||
| 53 | } |
||
| 54 |