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 data associated with the given key or NULL
 /**
  * @test
  */
 public function allSessionDataCanBeFlushedByCallingDestroy()
 {
     $session = new Session\TransientSession();
     $session->start();
     $session->putData('theKey', 'some data');
     $session->destroy();
     $session->start();
     $this->assertNull($session->getData('theKey'));
 }