diff --git a/core/modules/image/tests/src/Functional/ImageEffectsTest.php b/core/modules/image/tests/src/Functional/ImageEffectsTest.php
index e9cb157abe..54f3c969c5 100644
--- a/core/modules/image/tests/src/Functional/ImageEffectsTest.php
+++ b/core/modules/image/tests/src/Functional/ImageEffectsTest.php
@@ -3,7 +3,7 @@
 namespace Drupal\Tests\image\Functional;
 
 use Drupal\image\Entity\ImageStyle;
-use Drupal\system\Tests\Image\ToolkitTestBase;
+use Drupal\Tests\system\Functional\Image\ToolkitTestBase;
 
 /**
  * Tests that the image effects pass parameters to the toolkit correctly.
diff --git a/core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php b/core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php
index a28c786904..a0f508041b 100644
--- a/core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php
+++ b/core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php
@@ -161,8 +161,8 @@ public function save($destination) {
    * @param array $args
    *   Values passed to hook.
    *
-   * @see \Drupal\system\Tests\Image\ToolkitTestBase::imageTestReset()
-   * @see \Drupal\system\Tests\Image\ToolkitTestBase::imageTestGetAllCalls()
+   * @see \Drupal\Tests\system\Functional\Image\ToolkitTestBase::imageTestReset()
+   * @see \Drupal\Tests\system\Functional\Image\ToolkitTestBase::imageTestGetAllCalls()
    */
   protected function logCall($op, $args) {
     $results = $this->state->get('image_test.results') ?: [];
diff --git a/core/modules/system/src/Tests/Image/ToolkitSetupFormTest.php b/core/tests/Drupal/FunctionalTests/Image/ToolkitSetupFormTest.php
similarity index 94%
rename from core/modules/system/src/Tests/Image/ToolkitSetupFormTest.php
rename to core/tests/Drupal/FunctionalTests/Image/ToolkitSetupFormTest.php
index 7dc9d33874..d501f1d98c 100644
--- a/core/modules/system/src/Tests/Image/ToolkitSetupFormTest.php
+++ b/core/tests/Drupal/FunctionalTests/Image/ToolkitSetupFormTest.php
@@ -1,15 +1,15 @@
 <?php
 
-namespace Drupal\system\Tests\Image;
+namespace Drupal\FunctionalTests\Image;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests image toolkit setup form.
  *
  * @group Image
  */
-class ToolkitSetupFormTest extends WebTestBase {
+class ToolkitSetupFormTest extends BrowserTestBase {
 
   /**
    * Admin user account.
diff --git a/core/modules/system/src/Tests/Image/ToolkitTest.php b/core/tests/Drupal/FunctionalTests/Image/ToolkitTest.php
similarity index 98%
rename from core/modules/system/src/Tests/Image/ToolkitTest.php
rename to core/tests/Drupal/FunctionalTests/Image/ToolkitTest.php
index f70c261efb..789369ceeb 100644
--- a/core/modules/system/src/Tests/Image/ToolkitTest.php
+++ b/core/tests/Drupal/FunctionalTests/Image/ToolkitTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\system\Tests\Image;
+namespace Drupal\FunctionalTests\Image;
 
 /**
  * Tests image toolkit functions.
diff --git a/core/modules/system/src/Tests/Image/ToolkitTestBase.php b/core/tests/Drupal/FunctionalTests/Image/ToolkitTestBase.php
similarity index 81%
rename from core/modules/system/src/Tests/Image/ToolkitTestBase.php
rename to core/tests/Drupal/FunctionalTests/Image/ToolkitTestBase.php
index 0051e94117..4abd3d98f8 100644
--- a/core/modules/system/src/Tests/Image/ToolkitTestBase.php
+++ b/core/tests/Drupal/FunctionalTests/Image/ToolkitTestBase.php
@@ -1,15 +1,20 @@
 <?php
 
-namespace Drupal\system\Tests\Image;
+namespace Drupal\FunctionalTests\Image;
+
+use Drupal\Component\Render\FormattableMarkup;
+use Drupal\Tests\BrowserTestBase;
+use Drupal\Tests\TestFileCreationTrait;
 
-use Drupal\simpletest\WebTestBase;
-use Drupal\Component\Utility\SafeMarkup;
 
 /**
  * Base class for image manipulation testing.
  */
-abstract class ToolkitTestBase extends WebTestBase {
+abstract class ToolkitTestBase extends BrowserTestBase {
 
+  use TestFileCreationTrait {
+    getTestFiles as drupalGetTestFiles;
+  }
   /**
    * Modules to enable.
    *
@@ -99,10 +104,10 @@ public function assertToolkitOperationsCalled(array $expected) {
     // Determine if there were any expected that were not called.
     $uncalled = array_diff($expected, $actual);
     if (count($uncalled)) {
-      $this->assertTrue(FALSE, SafeMarkup::format('Expected operations %expected to be called but %uncalled was not called.', ['%expected' => implode(', ', $expected), '%uncalled' => implode(', ', $uncalled)]));
+      $this->assertTrue(FALSE, new FormattableMarkup('Expected operations %expected to be called but %uncalled was not called.', ['%expected' => implode(', ', $expected), '%uncalled' => implode(', ', $uncalled)]));
     }
     else {
-      $this->assertTrue(TRUE, SafeMarkup::format('All the expected operations were called: %expected', ['%expected' => implode(', ', $expected)]));
+      $this->assertTrue(TRUE, new FormattableMarkup('All the expected operations were called: %expected', ['%expected' => implode(', ', $expected)]));
     }
 
     // Determine if there were any unexpected calls.
@@ -110,7 +115,7 @@ public function assertToolkitOperationsCalled(array $expected) {
     // count it as an error.
     $unexpected = array_diff($actual, $expected);
     if (count($unexpected) && (!in_array('apply', $expected) || count(array_intersect($unexpected, $operations)) !== count($unexpected))) {
-      $this->assertTrue(FALSE, SafeMarkup::format('Unexpected operations were called: %unexpected.', ['%unexpected' => implode(', ', $unexpected)]));
+      $this->assertTrue(FALSE, new FormattableMarkup('Unexpected operations were called: %unexpected.', ['%unexpected' => implode(', ', $unexpected)]));
     }
     else {
       $this->assertTrue(TRUE, 'No unexpected operations were called.');
