Вход Регистрация
Файл: src/vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/RiakCacheTest.php
Строк: 50
<?php

namespace DoctrineTestsCommonCache;

use 
RiakBucket;
use 
RiakConnection;
use 
RiakException;
use 
DoctrineCommonCacheRiakCache;

/**
 * RiakCache test
 *
 * @group Riak
 * @requires extension riak
 */
class RiakCacheTest extends CacheTest
{
    
/**
     * @var RiakConnection
     */
    
private $connection;

    
/**
     * @var RiakBucket
     */
    
private $bucket;

    protected function 
setUp()
    {
        try {
            
$this->connection = new Connection('127.0.0.1'8087);
            
$this->bucket     = new Bucket($this->connection'test');
        } catch (
ExceptionRiakException $e) {
            
$this->markTestSkipped('Cannot connect to Riak.');
        }
    }

    
/**
     * {@inheritdoc}
     */
    
public function testGetStats()
    {
        
$cache $this->_getCacheDriver();
        
$stats $cache->getStats();

        
$this->assertNull($stats);
    }

    
/**
     * Retrieve RiakCache instance.
     *
     * @return DoctrineCommonCacheRiakCache
     */
    
protected function _getCacheDriver()
    {
        return new 
RiakCache($this->bucket);
    }
}
Онлайн: 1
Реклама