You are here

public function UploadFetcherTest::testFetchException in Feeds 8.3

Tests a fetch that fails.

@covers ::fetch

File

tests/src/Unit/Feeds/Fetcher/UploadFetcherTest.php, line 89

Class

UploadFetcherTest
@coversDefaultClass \Drupal\feeds\Feeds\Fetcher\UploadFetcher @group feeds

Namespace

Drupal\Tests\feeds\Unit\Feeds\Fetcher

Code

public function testFetchException() {
  $feed = $this
    ->createMock(FeedInterface::class);
  $feed
    ->expects($this
    ->any())
    ->method('getSource')
    ->will($this
    ->returnValue('vfs://feeds/test_file'));
  $this
    ->expectException(RuntimeException::class);
  $this->fetcher
    ->fetch($feed, $this->state);
}