getData() public method

Returns the data associated with the given key.
public getData ( string $key ) : mixed
$key string An identifier for the content stored in the session.
return mixed The contents associated with the given key
 /**
  * @test
  * @expectedException \Neos\Flow\Session\Exception\SessionNotStartedException
  */
 public function getDataThrowsExceptionIfSessionIsNotStarted()
 {
     $session = new Session();
     $session->getData('some key');
 }