// types.
$expected_image_types =
[ 'png' => IMAGETYPE_PNG,
'gif' => IMAGETYPE_GIF,
'jpeg' => IMAGETYPE_JPEG,
'jpg' => IMAGETYPE_JPEG,
'jpe' => IMAGETYPE_JPEG,
'webp' => IMAGETYPE_WEBP,
];
$image =
$this->imageFactory->
get();
foreach ($expected_image_types as $extension =>
$expected_image_type) { $this->
assertSame($expected_image_type,
$image->
getToolkit()->
extensionToImageType($extension));
} } /**
* Data provider for ::testCreateImageFromScratch().
*/
public function providerSupportedImageTypes(): array
{ return [ [IMAGETYPE_PNG
],
[IMAGETYPE_GIF
],
[IMAGETYPE_JPEG
],
[