예제 #1
0
 /**
  * @param ChannelBeforeDeleteEvent $event
  */
 public function onChannelBeforeDelete(ChannelBeforeDeleteEvent $event)
 {
     /** @var Channel $channel */
     $channel = $event->getChannel();
     $dataSource = $channel->getDataSource();
     if ($dataSource) {
         $this->manager->delete($dataSource);
     }
 }
예제 #2
0
 public function testDeleteIntegrationWithErrors()
 {
     $this->em->expects($this->any())->method('remove')->with($this->equalTo($this->testIntegration))->will($this->throwException(new \Exception()));
     $this->connection->expects($this->once())->method('rollback');
     $this->assertFalse($this->deleteManager->delete($this->testIntegration));
 }