putData() public method

Stores the given data under the given key in the session
public putData ( string $key, object $data ) : void
$key string The key under which the data should be stored
$data object The data to be stored
return void
 /**
  * @test
  */
 public function hasKeyReturnsTrueOrFalseAccordingToAvailableKeys()
 {
     $session = new Session\TransientSession();
     $session->start();
     $session->putData('theKey', 'some data');
     $this->assertTrue($session->hasKey('theKey'));
     $this->assertFalse($session->hasKey('noKey'));
 }