'version' => '1.0',
'type' => 'video',
'html' => 'test',
]);
$response =
new Response(200,
$headers,
$body);
$client =
$this->
prophesize(Client::
class);
$client->
request('GET',
$url,
[RequestOptions::TIMEOUT => 5
]) ->
shouldBeCalled() ->
willReturn($response);
$fetcher =
new ResourceFetcher( $client->
reveal(),
$this->
createMock('\Drupal\media\OEmbed\ProviderRepositoryInterface'
),
new NullBackend('default'
) );
$fetcher->
fetchResource($url);
} /**
* Tests how the resource fetcher handles unknown Content-Type headers.
*
* @covers ::fetchResource
*/