Esempio n. 1
0
 /**
  * Retrieve disable auto group change checkbox state
  *
  * @return string
  */
 public function getDisableAutoGroupChangeCheckboxState()
 {
     $customerId = $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);
     $checkedByDefault = $customerId ? false : $this->_addressHelper->isDisableAutoGroupAssignDefaultValue();
     $value = $this->getDisableAutoGroupChangeAttributeValue();
     $state = '';
     if (!empty($value) || $checkedByDefault) {
         $state = 'checked';
     }
     return $state;
 }
Esempio n. 2
0
 public function testIsDisableAutoGroupAssignDefaultValue()
 {
     $this->scopeConfig->expects($this->once())->method('getValue')->with(\Magento\Customer\Helper\Address::XML_PATH_VIV_DISABLE_AUTO_ASSIGN_DEFAULT, \Magento\Store\Model\ScopeInterface::SCOPE_STORE)->will($this->returnValue(true));
     $this->assertTrue($this->helper->isDisableAutoGroupAssignDefaultValue());
 }