public function OEmbedSourceTest::providerThumbnailUri in Drupal 9
Data provider for ::testThumbnailUri().
Return value
array Sets of arguments to pass to the test method.
File
- core/
modules/ media/ tests/ src/ Kernel/ OEmbedSourceTest.php, line 52
Class
- OEmbedSourceTest
- @coversDefaultClass \Drupal\media\Plugin\media\Source\OEmbed
Namespace
Drupal\Tests\media\KernelCode
public function providerThumbnailUri() : array {
return [
'no query string, file extension is known' => [
'internal:/core/misc/druplicon.png',
],
'with query string and file extension' => [
'internal:/core/misc/druplicon.png?foo=bar',
],
'no query string, unknown file extension' => [
'internal:/core/misc/druplicon',
[
'Content-Type' => [
'image/png',
],
],
],
'query string, unknown file extension' => [
'internal:/core/misc/druplicon?pasta=ravioli',
[
'Content-Type' => [
'image/png',
],
],
],
'no query string, unknown file extension, exception' => [
'internal:/core/misc/druplicon',
'\\GuzzleHttp\\Exception\\TransferException',
],
];
}