/** * {@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); } }
/** * @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()); }
/** * @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()); }