Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function setScope($attribute)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'setScope');
     if (!$pluginInfo) {
         return parent::setScope($attribute);
     } else {
         return $this->___callPlugins('setScope', func_get_args(), $pluginInfo);
     }
 }
Ejemplo n.º 2
0
 /**
  * @magentoConfigFixture current_store catalog/price/scope 1
  */
 public function testSetScope()
 {
     $this->_model->setScope($this->_model->getAttribute());
     $this->assertEquals(\Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_WEBSITE, $this->_model->getAttribute()->getIsGlobal());
 }
Ejemplo n.º 3
0
 /**
  * @magentoConfigFixture current_store catalog/price/scope 1
  */
 public function testSetScope()
 {
     $this->_model->setScope($this->_model->getAttribute());
     $this->assertEquals(\Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_WEBSITE, $this->_model->getAttribute()->getIsGlobal());
 }