Ejemplo n.º 1
0
 public function setUp()
 {
     $this->option = $this->getMock('Magento\\Eav\\Model\\Resource\\Entity\\Attribute\\Option', [], [], '', false);
     $this->optionFactory = $this->getMock('Magento\\Eav\\Model\\Resource\\Entity\\Attribute\\OptionFactory', ['create']);
     $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);
 }
Ejemplo n.º 2
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\Resource\Entity\Attribute\Option */
     $option = $this->_optionFactory->create();
     return $option->getFlatUpdateSelect($this->getAttribute(), $store, false);
 }
Ejemplo n.º 3
0
 /**
  * Retrieve Select for update Attribute value in flat table
  *
  * @param   int $store
  * @return  \Magento\Framework\DB\Select|null
  */
 public function getFlatUpdateSelect($store)
 {
     return $this->optionFactory->create()->getFlatUpdateSelect($this->getAttribute(), $store, false);
 }
Ejemplo n.º 4
0
 /**
  * Retrieve Select for update Attribute value in flat table
  *
  * @param   int $store
  * @return  \Magento\Framework\DB\Select|null
  */
 public function getFlatUpdateSelect($store)
 {
     return $this->_entityAttribute->create()->getFlatUpdateSelect($this->getAttribute(), $store, false);
 }