Snc\RedisBundle\Session\Storage\Handler\RedisSessionHandler::destroy PHP Method

destroy() public method

public destroy ( $sessionId )
    public function destroy($sessionId)
    {
        $this->redis->del($this->getRedisKey($sessionId));
        $this->close();
        return true;
    }

Usage Example

 public function testDeletingSessionData()
 {
     $this->redis->expects($this->once())->method('del')->with($this->equalTo('session:_symfony'));
     $handler = new RedisSessionHandler($this->redis, array(), 'session', false);
     $handler->destroy('_symfony');
 }