diff --git a/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php b/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php index 4fbd512..a7fb86f 100644 --- a/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php +++ b/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php @@ -52,6 +52,11 @@ protected function setUp() { // Set the image factory service. $this->imageFactory = $this->container->get('image.factory'); + + // For PHP 7.1+, ensure test PHP has webp extension installed. + if (PHP_VERSION_ID >= 70100) { + $this->assertTrue(function_exists('imagewebp')); + } } protected function checkRequirements() {