public function RedisCacheTest::setUp

File

drupal/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Cache/RedisCacheTest.php, line 11

Class

RedisCacheTest

Namespace

Doctrine\Tests\Common\Cache

Code

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');
  }
}