/**
  * {@inheritDoc}
  */
 public function getId()
 {
     if (!self::$sessionStarted) {
         throw new \RuntimeException('The session must be started before reading its ID');
     }
     $this->session->getSessionId();
 }
Exemple #2
0
 /**
  * @magentoConfigFixture current_store web/session/use_frontend_sid 1
  */
 public function testSetSessionIdFromParam()
 {
     $this->assertNotEquals('test_id', $this->_model->getSessionId());
     $_GET[$this->_model->getSessionIdQueryParam()] = 'test-id';
     $this->_model->setSessionId();
     $this->assertEquals('test-id', $this->_model->getSessionId());
     /* Use not valid identifier */
     $_GET[$this->_model->getSessionIdQueryParam()] = 'test_id';
     $this->_model->setSessionId();
     $this->assertEquals('test-id', $this->_model->getSessionId());
 }