You are here

class RedisCacheTest in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/RedisCacheTest.php \Doctrine\Tests\Common\Cache\RedisCacheTest

Hierarchy

  • class \Doctrine\Tests\Common\Cache\CacheTest extends \Doctrine\Tests\DoctrineTestCase

Expanded class hierarchy of RedisCacheTest

File

vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/RedisCacheTest.php, line 8

Namespace

Doctrine\Tests\Common\Cache
View source
class RedisCacheTest extends CacheTest {
  private $_redis;
  public function setUp() {
    if (extension_loaded('redis')) {
      $this->_redis = new \Redis();
      $ok = @$this->_redis
        ->connect('127.0.0.1');
      if (!$ok) {
        $this
          ->markTestSkipped('The ' . __CLASS__ . ' requires the use of redis');
      }
    }
    else {
      $this
        ->markTestSkipped('The ' . __CLASS__ . ' requires the use of redis');
    }
  }
  public function testHitMissesStatsAreProvided() {
    $cache = $this
      ->_getCacheDriver();
    $stats = $cache
      ->getStats();
    $this
      ->assertNotNull($stats[Cache::STATS_HITS]);
    $this
      ->assertNotNull($stats[Cache::STATS_MISSES]);
  }
  protected function _getCacheDriver() {
    $driver = new RedisCache();
    $driver
      ->setRedis($this->_redis);
    return $driver;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CacheTest::falseCastedValuesProvider public function The following values get converted to FALSE if you cast them to a boolean.
CacheTest::isSharedStorage protected function Return whether multiple cache providers share the same storage. 3
CacheTest::provideCrudValues public function
CacheTest::testBasicCrudOperations public function @dataProvider provideCrudValues
CacheTest::testCachedObject public function Check to see that objects are correctly serialized and unserialized by the cache provider. 1
CacheTest::testDeleteAll public function
CacheTest::testDeleteAllAndNamespaceVersioningBetweenCaches public function
CacheTest::testDeleteAllNamespace public function
CacheTest::testFalseCastedValues public function Check to see that, even if the user saves a value that can be interpreted as false, the cache adapter will still recognize its existence there. 2
CacheTest::testFetchMissShouldReturnFalse public function
CacheTest::testFetchMulti public function
CacheTest::testFetchMultipleObjects public function Check to see that objects fetched via fetchMultiple are properly unserialized 1
CacheTest::testFetchMultiWillFilterNonRequestedKeys public function
CacheTest::testFlushAll public function
CacheTest::testFlushAllAndNamespaceVersioningBetweenCaches public function
CacheTest::testGetStats public function @group DCOM-43 8
CacheTest::testNamespace public function
RedisCacheTest::$_redis private property
RedisCacheTest::setUp public function
RedisCacheTest::testHitMissesStatsAreProvided public function
RedisCacheTest::_getCacheDriver protected function Overrides CacheTest::_getCacheDriver