public function testGetFlatUpdateSelect() { $store = 1; $select = 'select'; $this->option->expects($this->once())->method('getFlatUpdateSelect')->with($this->attribute, $store, false)->will($this->returnValue($select)); $this->assertEquals($select, $this->model->getFlatUpdateSelect($store)); }
/** * Prepare option values of user defined attribute * * @param array|\Magento\Eav\Model\Resource\Entity\Attribute\Option $option * @param string $inputType * @param array $defaultValues * @return array */ protected function _prepareUserDefinedAttributeOptionValues($option, $inputType, $defaultValues) { $optionId = $option->getId(); $value['checked'] = in_array($optionId, $defaultValues) ? 'checked="checked"' : ''; $value['intype'] = $inputType; $value['id'] = $optionId; $value['sort_order'] = $option->getSortOrder(); foreach ($this->getStores() as $store) { $storeId = $store->getId(); $storeValues = $this->getStoreOptionValues($storeId); $value['store' . $storeId] = isset($storeValues[$optionId]) ? $this->escapeHtml($storeValues[$optionId]) : ''; } return [$value]; }