public function testGetData()
 {
     $this->object->setValue('key1', 'value1', 'default1');
     $this->object->setValue('key2', 'value2', 'default2');
     $this->object->setValue('key3', 'value3', 'value3');
     $this->object->unsValue('key1');
     $this->assertEquals(['key2' => 'value2'], $this->object->getData());
 }
Exemple #2
0
 /**
  * Logout customer
  *
  * @api
  * @return $this
  */
 public function logout()
 {
     if ($this->isLoggedIn()) {
         $this->_eventManager->dispatch('customer_logout', ['customer' => $this->getCustomer()]);
         $this->_logout();
     }
     $this->_httpContext->unsValue(Context::CONTEXT_AUTH);
     return $this;
 }
Exemple #3
0
 /**
  * Logout customer
  *
  * @return $this
  */
 public function logout()
 {
     if ($this->isLoggedIn()) {
         $this->_eventManager->dispatch('customer_logout', array('customer' => $this->getCustomer()));
         $this->_logout();
     }
     $this->_httpContext->unsValue(\Magento\Customer\Helper\Data::CONTEXT_AUTH);
     return $this;
 }