RiakCacheTest.php in Zircon Profile 8
File
vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/RiakCacheTest.php
View source
<?php
namespace Doctrine\Tests\Common\Cache;
use Riak\Bucket;
use Riak\Connection;
use Riak\Exception;
use Doctrine\Common\Cache\RiakCache;
class RiakCacheTest extends CacheTest {
private $connection;
private $bucket;
public function setUp() {
if (!extension_loaded('riak')) {
$this
->markTestSkipped('The ' . __CLASS__ . ' requires the use of Riak');
}
try {
$this->connection = new Connection('127.0.0.1', 8087);
$this->bucket = new Bucket($this->connection, 'test');
} catch (Exception\RiakException $e) {
$this
->markTestSkipped('The ' . __CLASS__ . ' requires the use of Riak');
}
}
public function testGetStats() {
$cache = $this
->_getCacheDriver();
$stats = $cache
->getStats();
$this
->assertNull($stats);
}
protected function _getCacheDriver() {
return new RiakCache($this->bucket);
}
}