/** * {@inheritdoc} */ public function validate($object) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'validate'); if (!$pluginInfo) { return parent::validate($object); } else { return $this->___callPlugins('validate', func_get_args(), $pluginInfo); } }
/** * @expectedException \Magento\Framework\Exception\LocalizedException */ public function testValidateDuplicateWebsite() { $product = new \Magento\Framework\DataObject(); $product->setTierPrice([['website_id' => 0, 'cust_group' => 1, 'price_qty' => 2, 'price' => 8], ['website_id' => 0, 'cust_group' => 1, 'price_qty' => 5, 'price' => 5], ['website_id' => 1, 'cust_group' => 1, 'price_qty' => 5, 'price' => 5]]); $this->_model->validate($product); }