Example #1
0
 protected function setUp()
 {
     $this->option = $this->getMock('Magento\\Eav\\Model\\ResourceModel\\Entity\\Attribute\\Option', [], [], '', false);
     $this->optionFactory = $this->getMock('Magento\\Eav\\Model\\ResourceModel\\Entity\\Attribute\\OptionFactory', ['create'], [], '', false);
     $this->optionFactory->expects($this->any())->method('create')->will($this->returnValue($this->option));
     $this->attribute = $this->getMock('Magento\\Eav\\Model\\Entity\\Attribute\\AbstractAttribute', [], [], '', false);
     $this->model = (new ObjectManager($this))->getObject('Magento\\Bundle\\Model\\Product\\Attribute\\Source\\Price\\View', ['optionFactory' => $this->optionFactory]);
     $this->model->setAttribute($this->attribute);
 }
Example #2
0
 /**
  * Retrieve Select For Flat Attribute update
  *
  * @param int $store
  * @return \Magento\Framework\DB\Select|null
  */
 public function getFlatUpdateSelect($store)
 {
     return $this->_attrOptionFactory->create()->getFlatUpdateSelect($this->getAttribute(), $store);
 }
Example #3
0
 /**
  * Retrieve Select for update attribute value in flat table
  *
  * @param   int $store
  * @return  \Magento\Framework\DB\Select|null
  */
 public function getFlatUpdateSelect($store)
 {
     /** @var $option \Magento\Eav\Model\ResourceModel\Entity\Attribute\Option */
     $option = $this->_optionFactory->create();
     return $option->getFlatUpdateSelect($this->getAttribute(), $store, false);
 }