/** * @param \Magento\Store\Model\StoreFactory $storeFactory * @param \Magento\Store\Model\WebsiteFactory $websiteFactory * @param \Magento\Store\Model\GroupFactory $groupFactory */ public function __construct(\Magento\Store\Model\StoreFactory $storeFactory, \Magento\Store\Model\WebsiteFactory $websiteFactory, \Magento\Store\Model\GroupFactory $groupFactory) { $this->_store = $storeFactory->create(); $this->_store->setId(\Magento\Store\Model\Store::DISTRO_STORE_ID); $this->_store->setCode(\Magento\Store\Model\Store::DEFAULT_CODE); $this->_website = $websiteFactory->create(); $this->_group = $groupFactory->create(); }
public function testIsCanDelete() { $this->assertFalse($this->model->isCanDelete()); $this->model->load(1); $this->assertFalse($this->model->isCanDelete()); $this->model->setId(100); $this->assertFalse($this->model->isCanDelete()); }
/** * {@inheritdoc} */ public function setId($value) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'setId'); if (!$pluginInfo) { return parent::setId($value); } else { return $this->___callPlugins('setId', func_get_args(), $pluginInfo); } }