Ejemplo n.º 1
0
 /**
  * Renew session id and update session cookie
  *
  * @return $this
  */
 public function regenerateId()
 {
     if (headers_sent()) {
         return $this;
     }
     if ($this->isSessionExists()) {
         session_regenerate_id(true);
     } else {
         session_start();
     }
     $this->storage->init(isset($_SESSION) ? $_SESSION : []);
     if ($this->sessionConfig->getUseCookies()) {
         $this->clearSubDomainSessionCookie();
     }
     return $this;
 }
Ejemplo n.º 2
0
 /**
  * Unset all session data
  *
  * @return $this
  */
 public function clearStorage()
 {
     $this->storage->unsetData();
     return $this;
 }
Ejemplo n.º 3
0
 public function testSetQuoteId()
 {
     $quoteId = 1;
     $this->storageMock->expects($this->once())->method('setQuoteId')->with($quoteId);
     $this->assertInstanceOf('Magento\\Authorizenet\\Model\\Directpost\\Session', $this->session->setQuoteId($quoteId));
 }