public function setUp() { $config = file_get_contents(REDIS_CONF); preg_match('#^\\s*port\\s+([0-9]+)#m', $config, $matches); $this->redis = new RedisApi('localhost', $matches[1]); $this->redis->prefix(REDIS_NAMESPACE); $this->redis->select(REDIS_DATABASE); // Flush redis $this->redis->flushall(); }
public function __construct($host, $port = 6379, $password = null) { parent::__construct($host, $port, 5, $password); }