You are here

public function HttpFetcherTest::testFetch404 in Feeds 8.3

Tests fetching from a HTTP source that returns a 404 (not found).

@covers ::fetch

File

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

Class

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

Namespace

Drupal\Tests\feeds\Unit\Feeds\Fetcher

Code

public function testFetch404() {
  $this->mockHandler
    ->append(new Response(404));
  $this
    ->expectException(RuntimeException::class);
  $this->fetcher
    ->fetch($this->feed
    ->reveal(), new State());
}