From c0ae5a3f6c283fd8de169b4a3a58689c83363e15 Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Sun, 20 Feb 2022 09:50:37 +0000
Subject: [PATCH] Issue #2861376 by chiranjeeb2410, tvb, vacho, Mile23,
 mr.baileys, dawehner, mondrake: ToolkitGdTest uses checkRequirements()
 incorrectly

(cherry picked from commit cb858a9c70fb5df1a884cd745a3be8891eeb04a7)
---
 .../Drupal/KernelTests/Core/Image/ToolkitGdTest.php   | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php b/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php
index 4031189c9b17..3854f3ef8f1d 100644
--- a/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php
@@ -13,6 +13,7 @@
  * crop, scale and crop, and desaturate.
  *
  * @group Image
+ * @requires extension gd
  */
 class ToolkitGdTest extends KernelTestBase {
 
@@ -65,16 +66,6 @@ protected function setUp(): void {
     $this->imageFactory = $this->container->get('image.factory');
   }
 
-  protected function checkRequirements() {
-    // GD2 support is available.
-    if (!function_exists('imagegd2')) {
-      return [
-        'Image manipulations for the GD toolkit cannot run because the GD toolkit is not available.',
-      ];
-    }
-    return parent::checkRequirements();
-  }
-
   /**
    * Function to compare two colors by RGBa.
    */
-- 
GitLab