getId() public method

Returns the current session ID.
public getId ( ) : string
return string The current session ID
 /**
  * Proofs correct logging behaviour without argument reason given
  *
  * @test
  */
 public function logDestroyDoesNotRequireArgumentReason()
 {
     $testSession = new TransientSession();
     $testSession->start();
     $testSessionId = $testSession->getId();
     $mockJoinPoint = new JoinPoint($testSession, TransientSession::class, 'destroy', []);
     $mockSystemLogger = $this->createMock(SystemLoggerInterface::class);
     $mockSystemLogger->expects($this->once())->method('log')->with($this->equalTo('TransientSession: Destroyed session with id ' . $testSessionId . ': no reason given'));
     $loggingAspect = new LoggingAspect();
     $this->inject($loggingAspect, 'systemLogger', $mockSystemLogger);
     $loggingAspect->logDestroy($mockJoinPoint);
 }
 /**
  * @test
  * @expectedException \Neos\Flow\Session\Exception\SessionNotStartedException
  */
 public function tryingToGetTheSessionIdWithoutStartingTheSessionThrowsAnException()
 {
     $session = new Session\TransientSession();
     $session->getId();
 }