destroy() public method

Explicitly destroys all session data
public destroy ( string $reason = null ) : void
$reason string A reason for destroying the session – used by the LoggingAspect
return void
 /**
  * @test
  * @expectedException \Neos\Flow\Session\Exception\SessionNotStartedException
  */
 public function destroyThrowsExceptionIfSessionIsNotStarted()
 {
     $session = new Session();
     $session->destroy();
 }