You are here

public function HttpFetcherTest::testFetchError in Feeds 8.3

Tests a fetch that fails.

@covers ::fetch

File

tests/src/Unit/Feeds/Fetcher/HttpFetcherTest.php, line 121

Class

HttpFetcherTest
@coversDefaultClass \Drupal\feeds\Feeds\Fetcher\HttpFetcher @group feeds

Namespace

Drupal\Tests\feeds\Unit\Feeds\Fetcher

Code

public function testFetchError() {
  $this->mockHandler
    ->append(new RequestException('', new Request('GET', 'http://google.com')));
  $this
    ->expectException(RuntimeException::class);
  $this->fetcher
    ->fetch($this->feed
    ->reveal(), new State());
}