set('config', new Config([ 'redis' => [ 'host' => (array_key_exists('REDIS_HOST', $_ENV)) ? $_ENV['REDIS_HOST'] : 'localhost', 'port' => 6379, 'password' => '', 'database' => 13, ] ])); $this->driver = new RedisDriver($container); } public function tearDown() { parent::tearDown(); if ( ! is_null($this->driver)) { $this->driver->__destruct(); } } }