diff --git a/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php b/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php
index bb2e481..301105d 100644
--- a/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php
@@ -20,6 +20,10 @@ class ToolkitGdTest extends KernelTestBase {
    *
    * @var \Drupal\Core\Image\ImageFactory
    */
+
+  /**
+   * @requires function imagegd2
+   */
   protected $imageFactory;
 
   // Colors that are used in testing.
@@ -54,16 +58,6 @@ protected function setUp() {
     $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.
    */
