/** * {@inheritdoc} */ public function delete(\Magento\Catalog\Api\Data\ProductAttributeInterface $attribute) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'delete'); if (!$pluginInfo) { return parent::delete($attribute); } else { return $this->___callPlugins('delete', func_get_args(), $pluginInfo); } }
public function testDelete() { $attributeMock = $this->getMock('Magento\\Catalog\\Model\\Resource\\Eav\\Attribute', [], [], '', false); $this->attributeResourceMock->expects($this->once())->method('delete')->with($attributeMock); $this->assertEquals(true, $this->model->delete($attributeMock)); }