Example #1
0
 /**
  * Get Session model
  *
  * @return \Magento\Persistent\Model\Session
  */
 public function getSession()
 {
     if ($this->_sessionModel === null) {
         $this->_sessionModel = $this->_sessionFactory->create();
         $this->_sessionModel->loadByCookieKey();
     }
     return $this->_sessionModel;
 }
Example #2
0
 public function testLoadByCookieKeyWithNull()
 {
     $this->cookieManagerMock->expects($this->once())->method('getCookie')->with(\Magento\Persistent\Model\Session::COOKIE_NAME)->will($this->returnValue(null));
     $this->session->loadByCookieKey(null);
 }