public function HttpFetcherTest::testFetch in Feeds 8.3
Tests a successful fetch from a HTTP source.
@covers ::fetch
File
- tests/
src/ Unit/ Feeds/ Fetcher/ HttpFetcherTest.php, line 85
Class
- HttpFetcherTest
- @coversDefaultClass \Drupal\feeds\Feeds\Fetcher\HttpFetcher @group feeds
Namespace
Drupal\Tests\feeds\Unit\Feeds\FetcherCode
public function testFetch() {
$this->mockHandler
->append(new Response(200, [], 'test data'));
$result = $this->fetcher
->fetch($this->feed
->reveal(), new State());
$this
->assertSame('test data', $result
->getRaw());
}