public function FeedRefreshTest::testExceptionOnFetchEvent in Feeds 8.3
Tests that a fetch event is dispatched when initiating an import.
File
- tests/src/ Unit/ Plugin/ QueueWorker/ FeedRefreshTest.php, line 129 
Class
- FeedRefreshTest
- @coversDefaultClass \Drupal\feeds\Plugin\QueueWorker\FeedRefresh @group feeds
Namespace
Drupal\Tests\feeds\Unit\Plugin\QueueWorkerCode
public function testExceptionOnFetchEvent() {
  $this->dispatcher
    ->addListener(FeedsEvents::FETCH, function ($parse_event) {
    throw new RuntimeException();
  });
  $this
    ->expectException(RuntimeException::class);
  $this->plugin
    ->processItem([
    $this->feed,
    FeedsExecutableInterface::FETCH,
    [],
  ]);
}