Beispiel #1
0
 /**
  * @param array $badStoreData
  *
  * @dataProvider saveValidationDataProvider
  * @magentoAppIsolation enabled
  * @magentoAppArea adminhtml
  * @magentoDbIsolation enabled
  * @expectedException \Magento\Framework\Exception\LocalizedException
  */
 public function testSaveValidation($badStoreData)
 {
     $normalStoreData = ['code' => 'test', 'website_id' => 1, 'group_id' => 1, 'name' => 'test name', 'sort_order' => 0, 'is_active' => 1];
     $data = array_merge($normalStoreData, $badStoreData);
     $this->model->setData($data);
     $this->model->save();
 }
 /**
  * {@inheritdoc}
  */
 public function save()
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'save');
     if (!$pluginInfo) {
         return parent::save();
     } else {
         return $this->___callPlugins('save', func_get_args(), $pluginInfo);
     }
 }