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