/**
  * @expectedException \Magento\Framework\Exception\IntegrationException
  * @expectedExceptionMessage Integration with ID '1' does not exist.
  */
 public function testDeleteException()
 {
     $this->_integrationMock->expects($this->any())->method('getId')->will($this->returnValue(null));
     $this->_integrationMock->expects($this->once())->method('load')->will($this->returnSelf());
     $this->_integrationMock->expects($this->never())->method('delete');
     $this->_service->delete(self::VALUE_INTEGRATION_ID);
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function delete($integrationId)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'delete');
     if (!$pluginInfo) {
         return parent::delete($integrationId);
     } else {
         return $this->___callPlugins('delete', func_get_args(), $pluginInfo);
     }
 }