diff --git a/core/modules/system/src/Tests/Module/ModuleImplementsAlterTest.php b/core/modules/system/tests/src/Kernel/Extension/ModuleImplementsAlterTest.php
similarity index 93%
rename from core/modules/system/src/Tests/Module/ModuleImplementsAlterTest.php
rename to core/modules/system/tests/src/Kernel/Extension/ModuleImplementsAlterTest.php
index 2a34c20..324c9b2 100644
--- a/core/modules/system/src/Tests/Module/ModuleImplementsAlterTest.php
+++ b/core/modules/system/tests/src/Kernel/Extension/ModuleImplementsAlterTest.php
@@ -2,12 +2,12 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\Module\ModuleImplementsAlterTest.
+ * Contains \Drupal\system\Tests\Extension\ModuleImplementsAlterTest.
  */
 
-namespace Drupal\system\Tests\Module;
+namespace Drupal\Tests\system\Kernel\Extension;
 
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests hook_module_implements_alter().
@@ -17,6 +17,11 @@
 class ModuleImplementsAlterTest extends KernelTestBase {
 
   /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['system'];
+
+  /**
    * Tests hook_module_implements_alter() adding an implementation.
    *
    * @see \Drupal\Core\Extension\ModuleHandler::buildImplementationInfo()
diff --git a/core/modules/system/src/Tests/File/DirectoryTest.php b/core/modules/system/tests/src/Kernel/File/DirectoryTest.php
similarity index 98%
rename from core/modules/system/src/Tests/File/DirectoryTest.php
rename to core/modules/system/tests/src/Kernel/File/DirectoryTest.php
index 4c15a8e..90dcc80 100644
--- a/core/modules/system/src/Tests/File/DirectoryTest.php
+++ b/core/modules/system/tests/src/Kernel/File/DirectoryTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\File\DirectoryTest.
  */
 
-namespace Drupal\system\Tests\File;
+namespace Drupal\Tests\system\Kernel\File;
 
 use Drupal\Component\PhpStorage\FileStorage;
 
@@ -82,7 +82,7 @@ function testFileCheckDirectoryHandling() {
       $this->assertFalse(file_prepare_directory($directory, 0), 'Error reported for a non-writeable directory.', 'File');
 
       // Test directory permission modification.
-      $this->settingsSet('file_chmod_directory', 0777);
+      $this->setSetting('file_chmod_directory', 0777);
       $this->assertTrue(file_prepare_directory($directory, FILE_MODIFY_PERMISSIONS), 'No error reported when making directory writeable.', 'File');
     }
 
diff --git a/core/modules/system/src/Tests/File/FileTestBase.php b/core/modules/system/tests/src/Kernel/File/FileTestBase.php
similarity index 92%
rename from core/modules/system/src/Tests/File/FileTestBase.php
rename to core/modules/system/tests/src/Kernel/File/FileTestBase.php
index 93e998d..dccbef2 100644
--- a/core/modules/system/src/Tests/File/FileTestBase.php
+++ b/core/modules/system/tests/src/Kernel/File/FileTestBase.php
@@ -5,9 +5,10 @@
  * Contains \Drupal\system\Tests\File\FileTestBase.
  */
 
-namespace Drupal\system\Tests\File;
+namespace Drupal\Tests\system\Kernel\File;
 
-use Drupal\simpletest\KernelTestBase;
+use Drupal\Core\StreamWrapper\StreamWrapperInterface;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Base class for file tests that adds some additional file specific
@@ -39,10 +40,10 @@
   protected function setUp() {
     parent::setUp();
     $this->installConfig(array('system'));
-    $this->registerStreamWrapper('private', 'Drupal\Core\StreamWrapper\PrivateStream');
+    $this->container->get('stream_wrapper_manager')->registerWrapper('private', 'Drupal\Core\StreamWrapper\PrivateStream', StreamWrapperInterface::NORMAL);
 
     if (isset($this->scheme)) {
-      $this->registerStreamWrapper($this->scheme, $this->classname);
+      $this->container->get('stream_wrapper_manager')->registerWrapper($this->scheme, $this->classname, StreamWrapperInterface::NORMAL);
     }
   }
 
diff --git a/core/modules/system/src/Tests/File/MimeTypeTest.php b/core/modules/system/tests/src/Kernel/File/MimeTypeTest.php
similarity index 98%
rename from core/modules/system/src/Tests/File/MimeTypeTest.php
rename to core/modules/system/tests/src/Kernel/File/MimeTypeTest.php
index 6324bf0..8e217b8 100644
--- a/core/modules/system/src/Tests/File/MimeTypeTest.php
+++ b/core/modules/system/tests/src/Kernel/File/MimeTypeTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\File\MimeTypeTest.
  */
 
-namespace Drupal\system\Tests\File;
+namespace Drupal\Tests\system\Kernel\File;
 
 /**
  * Tests filename mimetype detection.
diff --git a/core/modules/system/src/Tests/File/NameMungingTest.php b/core/modules/system/tests/src/Kernel/File/NameMungingTest.php
similarity index 98%
rename from core/modules/system/src/Tests/File/NameMungingTest.php
rename to core/modules/system/tests/src/Kernel/File/NameMungingTest.php
index 3afd273..cbda7b3 100644
--- a/core/modules/system/src/Tests/File/NameMungingTest.php
+++ b/core/modules/system/tests/src/Kernel/File/NameMungingTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\File\NameMungingTest.
  */
 
-namespace Drupal\system\Tests\File;
+namespace Drupal\Tests\system\Kernel\File;
 
 /**
  * Tests filename munging and unmunging.
diff --git a/core/modules/system/src/Tests/File/ReadOnlyStreamWrapperTest.php b/core/modules/system/tests/src/Kernel/File/ReadOnlyStreamWrapperTest.php
similarity index 99%
rename from core/modules/system/src/Tests/File/ReadOnlyStreamWrapperTest.php
rename to core/modules/system/tests/src/Kernel/File/ReadOnlyStreamWrapperTest.php
index 4e43d3e..d2403b3 100644
--- a/core/modules/system/src/Tests/File/ReadOnlyStreamWrapperTest.php
+++ b/core/modules/system/tests/src/Kernel/File/ReadOnlyStreamWrapperTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\File\ReadOnlyStreamWrapperTest.
  */
 
-namespace Drupal\system\Tests\File;
+namespace Drupal\Tests\system\Kernel\File;
 
 /**
  * Tests the read-only stream wrapper write functions.
diff --git a/core/modules/system/src/Tests/File/RemoteFileDirectoryTest.php b/core/modules/system/tests/src/Kernel/File/RemoteFileDirectoryTest.php
similarity index 94%
rename from core/modules/system/src/Tests/File/RemoteFileDirectoryTest.php
rename to core/modules/system/tests/src/Kernel/File/RemoteFileDirectoryTest.php
index 12e3267..6b43b2d 100644
--- a/core/modules/system/src/Tests/File/RemoteFileDirectoryTest.php
+++ b/core/modules/system/tests/src/Kernel/File/RemoteFileDirectoryTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\File\RemoteFileDirectoryTest.
  */
 
-namespace Drupal\system\Tests\File;
+namespace Drupal\Tests\system\Kernel\File;
 
 /**
  * Tests operations dealing with directories.
diff --git a/core/modules/system/src/Tests/File/RemoteFileScanDirectoryTest.php b/core/modules/system/tests/src/Kernel/File/RemoteFileScanDirectoryTest.php
similarity index 94%
rename from core/modules/system/src/Tests/File/RemoteFileScanDirectoryTest.php
rename to core/modules/system/tests/src/Kernel/File/RemoteFileScanDirectoryTest.php
index 4f601f8..688764b 100644
--- a/core/modules/system/src/Tests/File/RemoteFileScanDirectoryTest.php
+++ b/core/modules/system/tests/src/Kernel/File/RemoteFileScanDirectoryTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\File\RemoteFileScanDirectoryTest.
  */
 
-namespace Drupal\system\Tests\File;
+namespace Drupal\Tests\system\Kernel\File;
 
 /**
  * Tests the file_scan_directory() function.
diff --git a/core/modules/system/src/Tests/File/RemoteFileUnmanagedCopyTest.php b/core/modules/system/tests/src/Kernel/File/RemoteFileUnmanagedCopyTest.php
similarity index 94%
rename from core/modules/system/src/Tests/File/RemoteFileUnmanagedCopyTest.php
rename to core/modules/system/tests/src/Kernel/File/RemoteFileUnmanagedCopyTest.php
index bf2a518..bb34e6f 100644
--- a/core/modules/system/src/Tests/File/RemoteFileUnmanagedCopyTest.php
+++ b/core/modules/system/tests/src/Kernel/File/RemoteFileUnmanagedCopyTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\File\RemoteFileUnmanagedCopyTest.
  */
 
-namespace Drupal\system\Tests\File;
+namespace Drupal\Tests\system\Kernel\File;
 
 /**
  * Tests the unmanaged file copy function.
diff --git a/core/modules/system/src/Tests/File/RemoteFileUnmanagedDeleteRecursiveTest.php b/core/modules/system/tests/src/Kernel/File/RemoteFileUnmanagedDeleteRecursiveTest.php
similarity index 95%
rename from core/modules/system/src/Tests/File/RemoteFileUnmanagedDeleteRecursiveTest.php
rename to core/modules/system/tests/src/Kernel/File/RemoteFileUnmanagedDeleteRecursiveTest.php
index 0eb8c2f..3bf86da 100644
--- a/core/modules/system/src/Tests/File/RemoteFileUnmanagedDeleteRecursiveTest.php
+++ b/core/modules/system/tests/src/Kernel/File/RemoteFileUnmanagedDeleteRecursiveTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\File\RemoteFileUnmanagedDeleteRecursiveTest.
  */
 
-namespace Drupal\system\Tests\File;
+namespace Drupal\Tests\system\Kernel\File;
 
 /**
  * Tests the unmanaged file delete recursive function.
diff --git a/core/modules/system/src/Tests/File/RemoteFileUnmanagedDeleteTest.php b/core/modules/system/tests/src/Kernel/File/RemoteFileUnmanagedDeleteTest.php
similarity index 94%
rename from core/modules/system/src/Tests/File/RemoteFileUnmanagedDeleteTest.php
rename to core/modules/system/tests/src/Kernel/File/RemoteFileUnmanagedDeleteTest.php
index 0fc0368..78e99dc 100644
--- a/core/modules/system/src/Tests/File/RemoteFileUnmanagedDeleteTest.php
+++ b/core/modules/system/tests/src/Kernel/File/RemoteFileUnmanagedDeleteTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\File\RemoteFileUnmanagedDeleteTest.
  */
 
-namespace Drupal\system\Tests\File;
+namespace Drupal\Tests\system\Kernel\File;
 
 /**
  * Tests the unmanaged file delete function.
diff --git a/core/modules/system/src/Tests/File/RemoteFileUnmanagedMoveTest.php b/core/modules/system/tests/src/Kernel/File/RemoteFileUnmanagedMoveTest.php
similarity index 94%
rename from core/modules/system/src/Tests/File/RemoteFileUnmanagedMoveTest.php
rename to core/modules/system/tests/src/Kernel/File/RemoteFileUnmanagedMoveTest.php
index 41e2f6c..170ffb1 100644
--- a/core/modules/system/src/Tests/File/RemoteFileUnmanagedMoveTest.php
+++ b/core/modules/system/tests/src/Kernel/File/RemoteFileUnmanagedMoveTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\File\RemoteFileUnmanagedMoveTest.
  */
 
-namespace Drupal\system\Tests\File;
+namespace Drupal\Tests\system\Kernel\File;
 
 /**
  * Tests the unmanaged file move function.
diff --git a/core/modules/system/src/Tests/File/RemoteFileUnmanagedSaveDataTest.php b/core/modules/system/tests/src/Kernel/File/RemoteFileUnmanagedSaveDataTest.php
similarity index 94%
rename from core/modules/system/src/Tests/File/RemoteFileUnmanagedSaveDataTest.php
rename to core/modules/system/tests/src/Kernel/File/RemoteFileUnmanagedSaveDataTest.php
index 4c43330..8ad87ff 100644
--- a/core/modules/system/src/Tests/File/RemoteFileUnmanagedSaveDataTest.php
+++ b/core/modules/system/tests/src/Kernel/File/RemoteFileUnmanagedSaveDataTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\File\RemoteFileUnmanagedSaveDataTest.
  */
 
-namespace Drupal\system\Tests\File;
+namespace Drupal\Tests\system\Kernel\File;
 
 /**
  * Tests the unmanaged file save data function.
diff --git a/core/modules/system/src/Tests/File/ScanDirectoryTest.php b/core/modules/system/tests/src/Kernel/File/ScanDirectoryTest.php
similarity index 99%
rename from core/modules/system/src/Tests/File/ScanDirectoryTest.php
rename to core/modules/system/tests/src/Kernel/File/ScanDirectoryTest.php
index 4b067f0..3ac512e 100644
--- a/core/modules/system/src/Tests/File/ScanDirectoryTest.php
+++ b/core/modules/system/tests/src/Kernel/File/ScanDirectoryTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\File\ScanDirectoryTest.
  */
 
-namespace Drupal\system\Tests\File;
+namespace Drupal\Tests\system\Kernel\File;
 
 /**
  * Tests the file_scan_directory() function.
diff --git a/core/modules/system/src/Tests/File/StreamWrapperTest.php b/core/modules/system/tests/src/Kernel/File/StreamWrapperTest.php
similarity index 97%
rename from core/modules/system/src/Tests/File/StreamWrapperTest.php
rename to core/modules/system/tests/src/Kernel/File/StreamWrapperTest.php
index 5816861..16e4e25 100644
--- a/core/modules/system/src/Tests/File/StreamWrapperTest.php
+++ b/core/modules/system/tests/src/Kernel/File/StreamWrapperTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\File\StreamWrapperTest.
  */
 
-namespace Drupal\system\Tests\File;
+namespace Drupal\Tests\system\Kernel\File;
 
 use Drupal\Core\DrupalKernel;
 use Drupal\Core\Site\Settings;
@@ -41,14 +41,12 @@ class StreamWrapperTest extends FileTestBase {
   protected $classname = 'Drupal\file_test\StreamWrapper\DummyStreamWrapper';
 
   function setUp() {
+    parent::setUp();
+
     // Add file_private_path setting.
-    $settings = Settings::getAll();
     $request = Request::create('/');;
     $site_path = DrupalKernel::findSitePath($request);
-    $settings['file_private_path'] = $site_path . '/private';
-    new Settings($settings + Settings::getAll());
-
-    parent::setUp();
+    $this->setSetting('file_private_path', $site_path . '/private');
   }
 
   /**
diff --git a/core/modules/system/src/Tests/File/UnmanagedCopyTest.php b/core/modules/system/tests/src/Kernel/File/UnmanagedCopyTest.php
similarity index 98%
rename from core/modules/system/src/Tests/File/UnmanagedCopyTest.php
rename to core/modules/system/tests/src/Kernel/File/UnmanagedCopyTest.php
index 22a0615..ae36584 100644
--- a/core/modules/system/src/Tests/File/UnmanagedCopyTest.php
+++ b/core/modules/system/tests/src/Kernel/File/UnmanagedCopyTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\File\UnmanagedCopyTest.
  */
 
-namespace Drupal\system\Tests\File;
+namespace Drupal\Tests\system\Kernel\File;
 
 use Drupal\Core\Site\Settings;
 use Drupal\Core\File\FileSystem;
diff --git a/core/modules/system/src/Tests/File/UnmanagedDeleteRecursiveTest.php b/core/modules/system/tests/src/Kernel/File/UnmanagedDeleteRecursiveTest.php
similarity index 98%
rename from core/modules/system/src/Tests/File/UnmanagedDeleteRecursiveTest.php
rename to core/modules/system/tests/src/Kernel/File/UnmanagedDeleteRecursiveTest.php
index abef365..463df24 100644
--- a/core/modules/system/src/Tests/File/UnmanagedDeleteRecursiveTest.php
+++ b/core/modules/system/tests/src/Kernel/File/UnmanagedDeleteRecursiveTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\File\UnmanagedDeleteRecursiveTest.
  */
 
-namespace Drupal\system\Tests\File;
+namespace Drupal\Tests\system\Kernel\File;
 
 /**
  * Tests the unmanaged file delete recursive function.
diff --git a/core/modules/system/src/Tests/File/UnmanagedDeleteTest.php b/core/modules/system/tests/src/Kernel/File/UnmanagedDeleteTest.php
similarity index 96%
rename from core/modules/system/src/Tests/File/UnmanagedDeleteTest.php
rename to core/modules/system/tests/src/Kernel/File/UnmanagedDeleteTest.php
index 5cdcfe8..7784485 100644
--- a/core/modules/system/src/Tests/File/UnmanagedDeleteTest.php
+++ b/core/modules/system/tests/src/Kernel/File/UnmanagedDeleteTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\File\UnmanagedDeleteTest.
  */
 
-namespace Drupal\system\Tests\File;
+namespace Drupal\Tests\system\Kernel\File;
 
 /**
  * Tests the unmanaged file delete function.
diff --git a/core/modules/system/src/Tests/File/UnmanagedMoveTest.php b/core/modules/system/tests/src/Kernel/File/UnmanagedMoveTest.php
similarity index 98%
rename from core/modules/system/src/Tests/File/UnmanagedMoveTest.php
rename to core/modules/system/tests/src/Kernel/File/UnmanagedMoveTest.php
index 4a4e9e9..d3843a7 100644
--- a/core/modules/system/src/Tests/File/UnmanagedMoveTest.php
+++ b/core/modules/system/tests/src/Kernel/File/UnmanagedMoveTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\File\UnmanagedMoveTest.
  */
 
-namespace Drupal\system\Tests\File;
+namespace Drupal\Tests\system\Kernel\File;
 
 use Drupal\Core\Site\Settings;
 use Drupal\Core\File\FileSystem;
diff --git a/core/modules/system/src/Tests/File/UnmanagedSaveDataTest.php b/core/modules/system/tests/src/Kernel/File/UnmanagedSaveDataTest.php
similarity index 92%
rename from core/modules/system/src/Tests/File/UnmanagedSaveDataTest.php
rename to core/modules/system/tests/src/Kernel/File/UnmanagedSaveDataTest.php
index 2d3342c..9c460a3 100644
--- a/core/modules/system/src/Tests/File/UnmanagedSaveDataTest.php
+++ b/core/modules/system/tests/src/Kernel/File/UnmanagedSaveDataTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\File\UnmanagedSaveDataTest.
  */
 
-namespace Drupal\system\Tests\File;
+namespace Drupal\Tests\system\Kernel\File;
 
 /**
  * Tests the file_unmanaged_save_data() function.
@@ -18,7 +18,7 @@ class UnmanagedSaveDataTest extends FileTestBase {
    */
   function testFileSaveData() {
     $contents = $this->randomMachineName(8);
-    $this->settingsSet('file_chmod_file', 0777);
+    $this->setSetting('file_chmod_file', 0777);
 
     // No filename.
     $filepath = file_unmanaged_save_data($contents);
diff --git a/core/modules/system/src/Tests/File/UrlRewritingTest.php b/core/modules/system/tests/src/Kernel/File/UrlRewritingTest.php
similarity index 99%
rename from core/modules/system/src/Tests/File/UrlRewritingTest.php
rename to core/modules/system/tests/src/Kernel/File/UrlRewritingTest.php
index dd37222..2bd9eda 100644
--- a/core/modules/system/src/Tests/File/UrlRewritingTest.php
+++ b/core/modules/system/tests/src/Kernel/File/UrlRewritingTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\File\UrlRewritingTest.
  */
 
-namespace Drupal\system\Tests\File;
+namespace Drupal\Tests\system\Kernel\File;
 
 use Symfony\Component\HttpFoundation\Request;
 
diff --git a/core/modules/system/src/Tests/Form/ExternalFormUrlTest.php b/core/modules/system/tests/src/Kernel/Form/ExternalFormUrlTest.php
similarity index 91%
rename from core/modules/system/src/Tests/Form/ExternalFormUrlTest.php
rename to core/modules/system/tests/src/Kernel/Form/ExternalFormUrlTest.php
index f179ec9..0d161a2 100644
--- a/core/modules/system/src/Tests/Form/ExternalFormUrlTest.php
+++ b/core/modules/system/tests/src/Kernel/Form/ExternalFormUrlTest.php
@@ -5,11 +5,11 @@
  * Contains \Drupal\system\Tests\Form\ExternalFormUrlTest.
  */
 
-namespace Drupal\system\Tests\Form;
+namespace Drupal\Tests\system\Kernel\Form;
 
 use Drupal\Core\Form\FormInterface;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 use Drupal\user\Entity\User;
 use Symfony\Component\HttpFoundation\Request;
 
@@ -67,7 +67,6 @@ protected function setUp() {
     ]);
     $test_user->save();
     \Drupal::service('current_user')->setAccount($test_user);
-
   }
 
   /**
@@ -77,7 +76,11 @@ public function testActionUrlBehavior() {
     // Create a new request which has a request uri with multiple leading
     // slashes and make it the master request.
     $request_stack = \Drupal::service('request_stack');
+    /** @var \Symfony\Component\HttpFoundation\RequestStack $original_request */
     $original_request = $request_stack->pop();
+    // Just request some more so there is no request left.
+    $request_stack->pop();
+    $request_stack->pop();
     $request = Request::create($original_request->getSchemeAndHttpHost() . '//example.org');
     $request_stack->push($request);
 
diff --git a/core/modules/system/src/Tests/Form/FormCacheTest.php b/core/modules/system/tests/src/Kernel/Form/FormCacheTest.php
similarity index 97%
rename from core/modules/system/src/Tests/Form/FormCacheTest.php
rename to core/modules/system/tests/src/Kernel/Form/FormCacheTest.php
index 77d259e..bc8ed81 100644
--- a/core/modules/system/src/Tests/Form/FormCacheTest.php
+++ b/core/modules/system/tests/src/Kernel/Form/FormCacheTest.php
@@ -5,12 +5,12 @@
  * Contains \Drupal\system\Tests\Form\FormCacheTest.
  */
 
-namespace Drupal\system\Tests\Form;
+namespace Drupal\Tests\system\Kernel\Form;
 
 use Drupal\Core\Form\FormState;
 use Drupal\Core\Session\AnonymousUserSession;
 use Drupal\Core\Session\UserSession;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests \Drupal::formBuilder()->setCache() and
diff --git a/core/modules/system/src/Tests/Form/FormDefaultHandlersTest.php b/core/modules/system/tests/src/Kernel/Form/FormDefaultHandlersTest.php
similarity index 97%
rename from core/modules/system/src/Tests/Form/FormDefaultHandlersTest.php
rename to core/modules/system/tests/src/Kernel/Form/FormDefaultHandlersTest.php
index 94187af..a86bea4 100644
--- a/core/modules/system/src/Tests/Form/FormDefaultHandlersTest.php
+++ b/core/modules/system/tests/src/Kernel/Form/FormDefaultHandlersTest.php
@@ -5,12 +5,12 @@
  * Contains \Drupal\system\Tests\Form\FormDefaultHandlersTest.
  */
 
-namespace Drupal\system\Tests\Form;
+namespace Drupal\Tests\system\Kernel\Form;
 
 use Drupal\Core\Form\FormInterface;
 use Drupal\Core\Form\FormState;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests automatically added form handlers.
diff --git a/core/modules/system/src/Tests/Image/ToolkitGdTest.php b/core/modules/system/tests/src/Kernel/Image/ToolkitGdTest.php
similarity index 98%
rename from core/modules/system/src/Tests/Image/ToolkitGdTest.php
rename to core/modules/system/tests/src/Kernel/Image/ToolkitGdTest.php
index 1c61235..f47d801 100644
--- a/core/modules/system/src/Tests/Image/ToolkitGdTest.php
+++ b/core/modules/system/tests/src/Kernel/Image/ToolkitGdTest.php
@@ -5,11 +5,12 @@
  * Contains \Drupal\system\Tests\Image\ToolkitGdTest.
  */
 
-namespace Drupal\system\Tests\Image;
+namespace Drupal\Tests\system\Kernel\Image;
 
 use Drupal\Core\Image\ImageInterface;
 use Drupal\Component\Utility\SafeMarkup;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\Core\Site\Settings;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests that core image manipulations work properly: scale, resize, rotate,
@@ -253,7 +254,7 @@ function testManipulations() {
     }
 
     // Prepare a directory for test file results.
-    $directory = $this->publicFilesDirectory .'/imagetest';
+    $directory = Settings::get('file_public_path') .'/imagetest';
     file_prepare_directory($directory, FILE_CREATE_DIRECTORY);
 
     foreach ($files as $file) {
@@ -429,7 +430,7 @@ public function testResourceDestruction() {
    */
   function testGifTransparentImages() {
     // Prepare a directory for test file results.
-    $directory = $this->publicFilesDirectory .'/imagetest';
+    $directory = Settings::get('file_public_path') .'/imagetest';
     file_prepare_directory($directory, FILE_CREATE_DIRECTORY);
 
     // Test loading an indexed GIF image with transparent color set.
diff --git a/core/modules/system/src/Tests/KeyValueStore/DatabaseStorageExpirableTest.php b/core/modules/system/tests/src/Kernel/KeyValueStore/DatabaseStorageExpirableTest.php
similarity index 98%
rename from core/modules/system/src/Tests/KeyValueStore/DatabaseStorageExpirableTest.php
rename to core/modules/system/tests/src/Kernel/KeyValueStore/DatabaseStorageExpirableTest.php
index 944c9a1..4aa2463 100644
--- a/core/modules/system/src/Tests/KeyValueStore/DatabaseStorageExpirableTest.php
+++ b/core/modules/system/tests/src/Kernel/KeyValueStore/DatabaseStorageExpirableTest.php
@@ -5,10 +5,11 @@
  * Contains \Drupal\system\Tests\KeyValueStore\DatabaseStorageExpirableTest.
  */
 
-namespace Drupal\system\Tests\KeyValueStore;
+namespace Drupal\Tests\system\Kernel\KeyValueStore;
 
 use Drupal\Core\DependencyInjection\ContainerBuilder;
 use Drupal\Core\KeyValueStore\KeyValueFactory;
+use Drupal\KernelTests\Core\KeyValueStore\StorageTestBase;
 
 /**
  * Tests the key-value database storage.
diff --git a/core/modules/system/src/Tests/KeyValueStore/DatabaseStorageTest.php b/core/modules/system/tests/src/Kernel/KeyValueStore/DatabaseStorageTest.php
similarity index 77%
rename from core/modules/system/src/Tests/KeyValueStore/DatabaseStorageTest.php
rename to core/modules/system/tests/src/Kernel/KeyValueStore/DatabaseStorageTest.php
index dd9e44c..454c205 100644
--- a/core/modules/system/src/Tests/KeyValueStore/DatabaseStorageTest.php
+++ b/core/modules/system/tests/src/Kernel/KeyValueStore/DatabaseStorageTest.php
@@ -5,10 +5,11 @@
  * Contains \Drupal\system\Tests\KeyValueStore\DatabaseStorageTest.
  */
 
-namespace Drupal\system\Tests\KeyValueStore;
+namespace Drupal\Tests\system\Kernel\KeyValueStore;
 
 use Drupal\Core\DependencyInjection\ContainerBuilder;
 use Drupal\Core\KeyValueStore\KeyValueFactory;
+use Drupal\KernelTests\Core\KeyValueStore\StorageTestBase;
 
 /**
  * Tests the key-value database storage.
@@ -32,8 +33,8 @@ protected function setUp() {
   /**
    * {@inheritdoc}
    */
-  public function containerBuild(ContainerBuilder $container) {
-    parent::containerBuild($container);
+  public function register(ContainerBuilder $container) {
+    parent::register($container);
 
     $parameter[KeyValueFactory::DEFAULT_SETTING] = 'keyvalue.database';
     $container->setParameter('factory.keyvalue', $parameter);
diff --git a/core/modules/system/src/Tests/KeyValueStore/GarbageCollectionTest.php b/core/modules/system/tests/src/Kernel/KeyValueStore/GarbageCollectionTest.php
similarity index 95%
rename from core/modules/system/src/Tests/KeyValueStore/GarbageCollectionTest.php
rename to core/modules/system/tests/src/Kernel/KeyValueStore/GarbageCollectionTest.php
index 4a39c6f..491a7b3 100644
--- a/core/modules/system/src/Tests/KeyValueStore/GarbageCollectionTest.php
+++ b/core/modules/system/tests/src/Kernel/KeyValueStore/GarbageCollectionTest.php
@@ -5,12 +5,12 @@
  * Contains \Drupal\system\Tests\KeyValueStore\GarbageCollectionTest.
  */
 
-namespace Drupal\system\Tests\KeyValueStore;
+namespace Drupal\Tests\system\Kernel\KeyValueStore;
 
 use Drupal\Component\Serialization\PhpSerialize;
 use Drupal\Core\Database\Database;
 use Drupal\Core\KeyValueStore\DatabaseStorageExpirable;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests garbage collection for the expirable key-value database storage.
diff --git a/core/modules/system/src/Tests/Menu/MenuLinkTreeTest.php b/core/modules/system/tests/src/Kernel/Menu/MenuLinkTreeTest.php
similarity index 98%
rename from core/modules/system/src/Tests/Menu/MenuLinkTreeTest.php
rename to core/modules/system/tests/src/Kernel/Menu/MenuLinkTreeTest.php
index 04e366a..de2da19 100644
--- a/core/modules/system/src/Tests/Menu/MenuLinkTreeTest.php
+++ b/core/modules/system/tests/src/Kernel/Menu/MenuLinkTreeTest.php
@@ -5,11 +5,11 @@
  * Contains \Drupal\system\Tests\Menu\MenuLinkTreeTest.
  */
 
-namespace Drupal\system\Tests\Menu;
+namespace Drupal\Tests\system\Kernel\Menu;
 
 use Drupal\Core\Menu\MenuLinkTreeElement;
 use Drupal\Core\Menu\MenuTreeParameters;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 use Drupal\Tests\Core\Menu\MenuLinkMock;
 
 /**
diff --git a/core/modules/system/src/Tests/Plugin/Condition/RequestPathTest.php b/core/modules/system/tests/src/Kernel/Plugin/Condition/RequestPathTest.php
similarity index 97%
rename from core/modules/system/src/Tests/Plugin/Condition/RequestPathTest.php
rename to core/modules/system/tests/src/Kernel/Plugin/Condition/RequestPathTest.php
index 7a53844..949ede5 100644
--- a/core/modules/system/src/Tests/Plugin/Condition/RequestPathTest.php
+++ b/core/modules/system/tests/src/Kernel/Plugin/Condition/RequestPathTest.php
@@ -5,10 +5,10 @@
  * Contains \Drupal\system\Tests\Plugin\Condition\RequestPathTest.
  */
 
-namespace Drupal\system\Tests\Plugin\Condition;
+namespace Drupal\Tests\system\Kernel\Plugin\Condition;
 
 use Drupal\Core\Path\CurrentPathStack;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 use Drupal\system\Tests\Routing\MockAliasManager;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\RequestStack;
diff --git a/core/modules/system/src/Tests/Plugin/ContextPluginTest.php b/core/modules/system/tests/src/Kernel/Plugin/ContextPluginTest.php
similarity index 98%
rename from core/modules/system/src/Tests/Plugin/ContextPluginTest.php
rename to core/modules/system/tests/src/Kernel/Plugin/ContextPluginTest.php
index 4a9b73a..fdb9c76 100644
--- a/core/modules/system/src/Tests/Plugin/ContextPluginTest.php
+++ b/core/modules/system/tests/src/Kernel/Plugin/ContextPluginTest.php
@@ -5,14 +5,14 @@
  * Contains \Drupal\system\Tests\Plugin\ContextPluginTest.
  */
 
-namespace Drupal\system\Tests\Plugin;
+namespace Drupal\Tests\system\Kernel\Plugin;
 
 use Drupal\Component\Plugin\Exception\ContextException;
 use Drupal\Core\Plugin\Context\ContextDefinition;
+use Drupal\KernelTests\KernelTestBase;
 use Drupal\node\Entity\Node;
 use Drupal\node\Entity\NodeType;
 use Drupal\plugin_test\Plugin\MockBlockManager;
-use Drupal\simpletest\KernelTestBase;
 use Drupal\user\Entity\User;
 
 /**
diff --git a/core/modules/system/src/Tests/Queue/QueueSerializationTest.php b/core/modules/system/tests/src/Kernel/Queue/QueueSerializationTest.php
similarity index 96%
rename from core/modules/system/src/Tests/Queue/QueueSerializationTest.php
rename to core/modules/system/tests/src/Kernel/Queue/QueueSerializationTest.php
index 4a35cce..f58b2dd 100644
--- a/core/modules/system/src/Tests/Queue/QueueSerializationTest.php
+++ b/core/modules/system/tests/src/Kernel/Queue/QueueSerializationTest.php
@@ -4,13 +4,13 @@
  * Contains \Drupal\system\Tests\Queue\QueueSerializationTest.
  */
 
-namespace Drupal\system\Tests\Queue;
+namespace Drupal\Tests\system\Kernel\Queue;
 
 use Drupal\Core\DependencyInjection\DependencySerializationTrait;
 use Drupal\Core\Form\FormInterface;
 use Drupal\Core\Form\FormState;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 use Drupal\user\Entity\User;
 
 /**
diff --git a/core/modules/system/src/Tests/Render/Element/TableTest.php b/core/modules/system/tests/src/Kernel/Render/Element/TableTest.php
similarity index 99%
rename from core/modules/system/src/Tests/Render/Element/TableTest.php
rename to core/modules/system/tests/src/Kernel/Render/Element/TableTest.php
index 827b55a..706475b 100644
--- a/core/modules/system/src/Tests/Render/Element/TableTest.php
+++ b/core/modules/system/tests/src/Kernel/Render/Element/TableTest.php
@@ -5,9 +5,9 @@
  * Contains \Drupal\system\Tests\Render\Element\TableTest.
  */
 
-namespace Drupal\system\Tests\Render\Element;
+namespace Drupal\Tests\system\Kernel\Render\Element;
 
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests built-in table theme functions.
diff --git a/core/modules/system/src/Tests/Render/RenderCacheTest.php b/core/modules/system/tests/src/Kernel/Render/RenderCacheTest.php
similarity index 97%
rename from core/modules/system/src/Tests/Render/RenderCacheTest.php
rename to core/modules/system/tests/src/Kernel/Render/RenderCacheTest.php
index 975358c..2f299db 100644
--- a/core/modules/system/src/Tests/Render/RenderCacheTest.php
+++ b/core/modules/system/tests/src/Kernel/Render/RenderCacheTest.php
@@ -5,9 +5,9 @@
  * Contains \Drupal\system\Tests\Render\RenderCacheTest.
  */
 
-namespace Drupal\system\Tests\Render;
+namespace Drupal\Tests\system\Kernel\Render;
 
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 use Drupal\simpletest\UserCreationTrait;
 
 /**
diff --git a/core/modules/system/src/Tests/RouteProcessor/RouteNoneTest.php b/core/modules/system/tests/src/Kernel/RouteProcessor/RouteNoneTest.php
similarity index 98%
rename from core/modules/system/src/Tests/RouteProcessor/RouteNoneTest.php
rename to core/modules/system/tests/src/Kernel/RouteProcessor/RouteNoneTest.php
index f029156..0511166 100644
--- a/core/modules/system/src/Tests/RouteProcessor/RouteNoneTest.php
+++ b/core/modules/system/tests/src/Kernel/RouteProcessor/RouteNoneTest.php
@@ -5,12 +5,12 @@
  * Contains \Drupal\system\Tests\RouteProcessor\RouteNoneTest.
  */
 
-namespace Drupal\system\Tests\RouteProcessor;
+namespace Drupal\Tests\system\Kernel\RouteProcessor;
 
 use Drupal\Core\Cache\Cache;
 use Drupal\Core\GeneratedUrl;
 use Drupal\Core\Render\BubbleableMetadata;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 use Symfony\Cmf\Component\Routing\RouteObjectInterface;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\Routing\Route;
diff --git a/core/modules/system/src/Tests/RouteProcessor/RouteProcessorCurrentIntegrationTest.php b/core/modules/system/tests/src/Kernel/RouteProcessor/RouteProcessorCurrentIntegrationTest.php
similarity index 98%
rename from core/modules/system/src/Tests/RouteProcessor/RouteProcessorCurrentIntegrationTest.php
rename to core/modules/system/tests/src/Kernel/RouteProcessor/RouteProcessorCurrentIntegrationTest.php
index 8cdb9c7..39dd77b 100644
--- a/core/modules/system/src/Tests/RouteProcessor/RouteProcessorCurrentIntegrationTest.php
+++ b/core/modules/system/tests/src/Kernel/RouteProcessor/RouteProcessorCurrentIntegrationTest.php
@@ -5,12 +5,12 @@
  * Contains \Drupal\system\Tests\RouteProcessor\RouteProcessorCurrentIntegrationTest.
  */
 
-namespace Drupal\system\Tests\RouteProcessor;
+namespace Drupal\Tests\system\Kernel\RouteProcessor;
 
 use Drupal\Core\Cache\Cache;
 use Drupal\Core\GeneratedUrl;
 use Drupal\Core\Render\BubbleableMetadata;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 use Symfony\Cmf\Component\Routing\RouteObjectInterface;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\Routing\Route;
diff --git a/core/modules/system/src/Tests/Routing/ContentNegotiationRoutingTest.php b/core/modules/system/tests/src/Kernel/Routing/ContentNegotiationRoutingTest.php
similarity index 96%
rename from core/modules/system/src/Tests/Routing/ContentNegotiationRoutingTest.php
rename to core/modules/system/tests/src/Kernel/Routing/ContentNegotiationRoutingTest.php
index 71d3fe2..0f71607 100644
--- a/core/modules/system/src/Tests/Routing/ContentNegotiationRoutingTest.php
+++ b/core/modules/system/tests/src/Kernel/Routing/ContentNegotiationRoutingTest.php
@@ -5,10 +5,10 @@
  * Contains \Drupal\system\Tests\Routing\ContentNegotiationRoutingTest.
  */
 
-namespace Drupal\system\Tests\Routing;
+namespace Drupal\Tests\system\Kernel\Routing;
 
 use Drupal\Core\DependencyInjection\ContainerBuilder;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Response;
 
@@ -37,8 +37,8 @@ protected function setUp() {
   /**
    * {@inheritdoc}
    */
-  public function containerBuild(ContainerBuilder $container) {
-    parent::containerBuild($container);
+  public function register(ContainerBuilder $container) {
+    parent::register($container);
 
     // \Drupal\simpletest\KernelTestBase::containerBuild() removes the alias path
     // processor.
diff --git a/core/modules/system/src/Tests/Routing/ExceptionHandlingTest.php b/core/modules/system/tests/src/Kernel/Routing/ExceptionHandlingTest.php
similarity index 97%
rename from core/modules/system/src/Tests/Routing/ExceptionHandlingTest.php
rename to core/modules/system/tests/src/Kernel/Routing/ExceptionHandlingTest.php
index a404916..9c28daf 100644
--- a/core/modules/system/src/Tests/Routing/ExceptionHandlingTest.php
+++ b/core/modules/system/tests/src/Kernel/Routing/ExceptionHandlingTest.php
@@ -2,13 +2,13 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\Routing\ExceptionHandlingTest.
+ * Contains \Drupal\Tests\system\Kernel\Routing\ExceptionHandlingTest.
  */
 
-namespace Drupal\system\Tests\Routing;
+namespace Drupal\Tests\system\Kernel\Routing;
 
 use Drupal\Component\Utility\Html;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Response;
 
diff --git a/core/modules/system/src/Tests/Routing/RouteProviderTest.php b/core/modules/system/tests/src/Kernel/Routing/RouteProviderTest.php
similarity index 93%
rename from core/modules/system/src/Tests/Routing/RouteProviderTest.php
rename to core/modules/system/tests/src/Kernel/Routing/RouteProviderTest.php
index 056a37a..151946a 100644
--- a/core/modules/system/src/Tests/Routing/RouteProviderTest.php
+++ b/core/modules/system/tests/src/Kernel/Routing/RouteProviderTest.php
@@ -2,10 +2,10 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\Routing\RouteProviderTest.
+ * Contains \Drupal\Tests\system\Kernel\Routing\RouteProviderTest.
  */
 
-namespace Drupal\system\Tests\Routing;
+namespace Drupal\Tests\system\Kernel\Routing;
 
 use Drupal\Core\Cache\MemoryBackend;
 use Drupal\Core\Database\Database;
@@ -15,14 +15,14 @@
 use Drupal\Core\Routing\MatcherDumper;
 use Drupal\Core\Routing\RouteProvider;
 use Drupal\Core\State\State;
+use Drupal\KernelTests\KernelTestBase;
 use Drupal\Tests\Core\Routing\RoutingFixtures;
-use Drupal\simpletest\KernelTestBase;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\RequestStack;
+use Symfony\Component\Routing\Exception\ResourceNotFoundException;
 use Symfony\Component\Routing\Exception\RouteNotFoundException;
 use Symfony\Component\Routing\Route;
 use Symfony\Component\Routing\RouteCollection;
-use Symfony\Component\Routing\Exception\ResourceNotFoundException;
 
 /**
  * Confirm that the default route provider is working correctly.
@@ -91,8 +91,8 @@ protected function setUp() {
   /**
    * {@inheritdoc}
    */
-  public function containerBuild(ContainerBuilder $container) {
-    parent::containerBuild($container); // TODO: Change the autogenerated stub
+  public function register(ContainerBuilder $container) {
+    parent::register($container); // TODO: Change the autogenerated stub
 
     // Readd the incoming path alias for these tests.
     if ($container->hasDefinition('path_processor_alias')) {
@@ -185,7 +185,8 @@ function testOutlinePathMatch() {
 
     // All of the matching paths have the correct pattern.
     foreach ($routes as $route) {
-      $this->assertEqual($route->compile()->getPatternOutline(), '/path/%/one', 'Found path has correct pattern');
+      $this->assertEqual($route->compile()
+        ->getPatternOutline(), '/path/%/one', 'Found path has correct pattern');
     }
 
     $this->assertEqual(count($routes), 2, 'The correct number of routes was found.');
@@ -214,7 +215,8 @@ function testOutlinePathMatchTrailingSlash() {
 
     // All of the matching paths have the correct pattern.
     foreach ($routes as $route) {
-      $this->assertEqual($route->compile()->getPatternOutline(), '/path/%/one', 'Found path has correct pattern');
+      $this->assertEqual($route->compile()
+        ->getPatternOutline(), '/path/%/one', 'Found path has correct pattern');
     }
 
     $this->assertEqual(count($routes), 2, 'The correct number of routes was found.');
@@ -249,13 +251,13 @@ function testOutlinePathMatchDefaults() {
 
       // All of the matching paths have the correct pattern.
       foreach ($routes as $route) {
-        $this->assertEqual($route->compile()->getPatternOutline(), '/some/path', 'Found path has correct pattern');
+        $this->assertEqual($route->compile()
+          ->getPatternOutline(), '/some/path', 'Found path has correct pattern');
       }
 
       $this->assertEqual(count($routes), 1, 'The correct number of routes was found.');
       $this->assertNotNull($routes->get('poink'), 'The first matching route was found.');
-    }
-    catch (ResourceNotFoundException $e) {
+    } catch (ResourceNotFoundException $e) {
       $this->fail('No matching route found with default argument value.');
     }
   }
@@ -288,13 +290,13 @@ function testOutlinePathMatchDefaultsCollision() {
 
       // All of the matching paths have the correct pattern.
       foreach ($routes as $route) {
-        $this->assertEqual($route->compile()->getPatternOutline(), '/some/path', 'Found path has correct pattern');
+        $this->assertEqual($route->compile()
+          ->getPatternOutline(), '/some/path', 'Found path has correct pattern');
       }
 
       $this->assertEqual(count($routes), 1, 'The correct number of routes was found.');
       $this->assertNotNull($routes->get('poink'), 'The first matching route was found.');
-    }
-    catch (ResourceNotFoundException $e) {
+    } catch (ResourceNotFoundException $e) {
       $this->fail('No matching route found with default argument value.');
     }
   }
@@ -328,12 +330,14 @@ function testOutlinePathMatchDefaultsCollision2() {
       $routes_array = $routes->all();
 
       $this->assertEqual(count($routes), 2, 'The correct number of routes was found.');
-      $this->assertEqual(array('narf', 'poink'), array_keys($routes_array), 'Ensure the fitness was taken into account.');
+      $this->assertEqual(array(
+        'narf',
+        'poink'
+      ), array_keys($routes_array), 'Ensure the fitness was taken into account.');
       $this->assertNotNull($routes->get('narf'), 'The first matching route was found.');
       $this->assertNotNull($routes->get('poink'), 'The second matching route was found.');
       $this->assertNull($routes->get('eep'), 'Non-matching route was not found.');
-    }
-    catch (ResourceNotFoundException $e) {
+    } catch (ResourceNotFoundException $e) {
       $this->fail('No matching route found with default argument value.');
     }
   }
@@ -367,12 +371,14 @@ function testOutlinePathMatchDefaultsCollision3() {
       $routes_array = $routes->all();
 
       $this->assertEqual(count($routes), 2, 'The correct number of routes was found.');
-      $this->assertEqual(array('poink', 'poink2'), array_keys($routes_array), 'Ensure the fitness and name were taken into account in the sort.');
+      $this->assertEqual(array(
+        'poink',
+        'poink2'
+      ), array_keys($routes_array), 'Ensure the fitness and name were taken into account in the sort.');
       $this->assertNotNull($routes->get('poink'), 'The first matching route was found.');
       $this->assertNotNull($routes->get('poink2'), 'The second matching route was found.');
       $this->assertNull($routes->get('eep'), 'Non-matching route was not found.');
-    }
-    catch (ResourceNotFoundException $e) {
+    } catch (ResourceNotFoundException $e) {
       $this->fail('No matching route found with default argument value.');
     }
   }
@@ -402,12 +408,12 @@ public function testOutlinePathMatchZero() {
 
       // All of the matching paths have the correct pattern.
       foreach ($routes as $route) {
-        $this->assertEqual($route->compile()->getPatternOutline(), '/some/path/%', 'Found path has correct pattern');
+        $this->assertEqual($route->compile()
+          ->getPatternOutline(), '/some/path/%', 'Found path has correct pattern');
       }
 
       $this->assertEqual(count($routes), 1, 'The correct number of routes was found.');
-    }
-    catch (ResourceNotFoundException $e) {
+    } catch (ResourceNotFoundException $e) {
       $this->fail('No matchout route found with 0 as argument value');
     }
   }
@@ -522,13 +528,16 @@ public function testRouteByName() {
     $exception_thrown = FALSE;
     try {
       $provider->getRouteByName('invalid_name');
-    }
-    catch (RouteNotFoundException $e) {
+    } catch (RouteNotFoundException $e) {
       $exception_thrown = TRUE;
     }
     $this->assertTrue($exception_thrown, 'Random route was not found.');
 
-    $routes = $provider->getRoutesByNames(array('route_c', 'route_d', $this->randomMachineName()));
+    $routes = $provider->getRoutesByNames(array(
+      'route_c',
+      'route_d',
+      $this->randomMachineName()
+    ));
     $this->assertEqual(count($routes), 2, 'Only two valid routes found.');
     $this->assertEqual($routes['route_c']->getPath(), '/path/two');
     $this->assertEqual($routes['route_d']->getPath(), '/path/three');
diff --git a/core/modules/system/src/Tests/Routing/UrlIntegrationTest.php b/core/modules/system/tests/src/Kernel/Routing/UrlIntegrationTest.php
similarity index 91%
rename from core/modules/system/src/Tests/Routing/UrlIntegrationTest.php
rename to core/modules/system/tests/src/Kernel/Routing/UrlIntegrationTest.php
index 1d3f934..83b805e 100644
--- a/core/modules/system/src/Tests/Routing/UrlIntegrationTest.php
+++ b/core/modules/system/tests/src/Kernel/Routing/UrlIntegrationTest.php
@@ -2,13 +2,13 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\Routing\UrlIntegrationTest.
+ * Contains \Drupal\Tests\system\Kernel\Routing\UrlIntegrationTest.
  */
 
-namespace Drupal\system\Tests\Routing;
+namespace Drupal\Tests\system\Kernel\Routing;
 
 use Drupal\Core\Url;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 use Drupal\user\Entity\Role;
 use Drupal\user\Entity\User;
 
diff --git a/core/modules/system/src/Tests/ServiceProvider/ServiceProviderTest.php b/core/modules/system/tests/src/Kernel/ServiceProvider/ServiceProviderTest.php
similarity index 89%
rename from core/modules/system/src/Tests/ServiceProvider/ServiceProviderTest.php
rename to core/modules/system/tests/src/Kernel/ServiceProvider/ServiceProviderTest.php
index ef2fb79..863b9c2 100644
--- a/core/modules/system/src/Tests/ServiceProvider/ServiceProviderTest.php
+++ b/core/modules/system/tests/src/Kernel/ServiceProvider/ServiceProviderTest.php
@@ -2,12 +2,12 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\ServiceProvider\ServiceProviderTest.
+ * Contains \Drupal\Tests\system\Kernel\ServiceProvider\ServiceProviderTest.
  */
 
-namespace Drupal\system\Tests\ServiceProvider;
+namespace Drupal\Tests\system\Kernel\ServiceProvider;
 
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests service provider registration to the DIC.
@@ -21,7 +21,7 @@ class ServiceProviderTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = array('file', 'service_provider_test');
+  public static $modules = array('file', 'service_provider_test', 'system');
 
   /**
    * Tests that services provided by module service providers get registered to the DIC.
diff --git a/core/modules/system/src/Tests/System/InfoAlterTest.php b/core/modules/system/tests/src/Kernel/System/InfoAlterTest.php
similarity index 89%
rename from core/modules/system/src/Tests/System/InfoAlterTest.php
rename to core/modules/system/tests/src/Kernel/System/InfoAlterTest.php
index 6e7d231..ffcede5 100644
--- a/core/modules/system/src/Tests/System/InfoAlterTest.php
+++ b/core/modules/system/tests/src/Kernel/System/InfoAlterTest.php
@@ -2,12 +2,12 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\System\InfoAlterTest.
+ * Contains \Drupal\Tests\system\Kernel\System\InfoAlterTest.
  */
 
-namespace Drupal\system\Tests\System;
+namespace Drupal\Tests\system\Kernel\System;
 
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests the effectiveness of hook_system_info_alter().
diff --git a/core/modules/system/src/Tests/Theme/ImageTest.php b/core/modules/system/tests/src/Kernel/Theme/ImageTest.php
similarity index 95%
rename from core/modules/system/src/Tests/Theme/ImageTest.php
rename to core/modules/system/tests/src/Kernel/Theme/ImageTest.php
index d0f93df..f281c5d 100644
--- a/core/modules/system/src/Tests/Theme/ImageTest.php
+++ b/core/modules/system/tests/src/Kernel/Theme/ImageTest.php
@@ -2,12 +2,12 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\Theme\ImageTest.
+ * Contains \Drupal\Tests\system\Kernel\Theme\ImageTest.
  */
 
-namespace Drupal\system\Tests\Theme;
+namespace Drupal\Tests\system\Kernel\Theme;
 
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 use Symfony\Component\HttpFoundation\Request;
 
 /**
@@ -38,7 +38,7 @@ protected function setUp() {
     // the Request containing the correct hostname. KernelTestBase doesn't set
     // it, so push another request onto the stack to ensure it's correct.
     $request = Request::create('/', 'GET', [], [], [], $_SERVER);
-    $this->container = $this->kernel->getContainer();
+    $this->container = \Drupal::service('kernel')->getContainer();
     $this->container->get('request_stack')->push($request);
 
     $this->testImages = array(
diff --git a/core/modules/system/src/Tests/Theme/MessageTest.php b/core/modules/system/tests/src/Kernel/Theme/MessageTest.php
similarity index 84%
rename from core/modules/system/src/Tests/Theme/MessageTest.php
rename to core/modules/system/tests/src/Kernel/Theme/MessageTest.php
index 878d5bc..81befb9 100644
--- a/core/modules/system/src/Tests/Theme/MessageTest.php
+++ b/core/modules/system/tests/src/Kernel/Theme/MessageTest.php
@@ -2,12 +2,12 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\Theme\MessageTest.
+ * Contains \Drupal\Tests\system\Kernel\Theme\MessageTest.
  */
 
-namespace Drupal\system\Tests\Theme;
+namespace Drupal\Tests\system\Kernel\Theme;
 
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests built-in message theme functions.
diff --git a/core/modules/system/src/Tests/Theme/RegistryTest.php b/core/modules/system/tests/src/Kernel/Theme/RegistryTest.php
similarity index 98%
rename from core/modules/system/src/Tests/Theme/RegistryTest.php
rename to core/modules/system/tests/src/Kernel/Theme/RegistryTest.php
index 92d52b4..724c6ae 100644
--- a/core/modules/system/src/Tests/Theme/RegistryTest.php
+++ b/core/modules/system/tests/src/Kernel/Theme/RegistryTest.php
@@ -2,14 +2,14 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\Theme\RegistryTest.
+ * Contains \Drupal\Tests\system\Kernel\Theme\RegistryTest.
  */
 
-namespace Drupal\system\Tests\Theme;
+namespace Drupal\Tests\system\Kernel\Theme;
 
 use Drupal\Core\Theme\Registry;
-use Drupal\simpletest\KernelTestBase;
 use Drupal\Core\Utility\ThemeRegistry;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests the behavior of the ThemeRegistry class.
diff --git a/core/modules/system/src/Tests/Theme/StableThemeTest.php b/core/modules/system/tests/src/Kernel/Theme/StableThemeTest.php
similarity index 92%
rename from core/modules/system/src/Tests/Theme/StableThemeTest.php
rename to core/modules/system/tests/src/Kernel/Theme/StableThemeTest.php
index 0df5c71..5312541 100644
--- a/core/modules/system/src/Tests/Theme/StableThemeTest.php
+++ b/core/modules/system/tests/src/Kernel/Theme/StableThemeTest.php
@@ -2,12 +2,12 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\Theme\StableThemeTest.
+ * Contains \Drupal\Tests\system\Kernel\Theme\StableThemeTest.
  */
 
-namespace Drupal\system\Tests\Theme;
+namespace Drupal\Tests\system\Kernel\Theme;
 
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests the behavior of the Stable theme.
diff --git a/core/modules/system/src/Tests/Theme/ThemeSettingsTest.php b/core/modules/system/tests/src/Kernel/Theme/ThemeSettingsTest.php
similarity index 91%
rename from core/modules/system/src/Tests/Theme/ThemeSettingsTest.php
rename to core/modules/system/tests/src/Kernel/Theme/ThemeSettingsTest.php
index 3ef48d0..ab5fa2d 100644
--- a/core/modules/system/src/Tests/Theme/ThemeSettingsTest.php
+++ b/core/modules/system/tests/src/Kernel/Theme/ThemeSettingsTest.php
@@ -2,14 +2,14 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\Theme\ThemeSettingsTest.
+ * Contains \Drupal\Tests\system\Kernel\Theme\ThemeSettingsTest.
  */
 
-namespace Drupal\system\Tests\Theme;
+namespace Drupal\Tests\system\Kernel\Theme;
 
 use Drupal\Core\Config\InstallStorage;
 use Drupal\Core\Extension\ExtensionDiscovery;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests theme settings functionality.
diff --git a/core/modules/system/src/Tests/Theme/TwigEnvironmentTest.php b/core/modules/system/tests/src/Kernel/Theme/TwigEnvironmentTest.php
similarity index 95%
rename from core/modules/system/src/Tests/Theme/TwigEnvironmentTest.php
rename to core/modules/system/tests/src/Kernel/Theme/TwigEnvironmentTest.php
index 0bc52d0..9d89f09 100644
--- a/core/modules/system/src/Tests/Theme/TwigEnvironmentTest.php
+++ b/core/modules/system/tests/src/Kernel/Theme/TwigEnvironmentTest.php
@@ -2,14 +2,14 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\Theme\TwigEnvironmentTest.
+ * Contains \Drupal\Tests\system\Kernel\Theme\TwigEnvironmentTest.
  */
 
-namespace Drupal\system\Tests\Theme;
+namespace Drupal\Tests\system\Kernel\Theme;
 
 use Drupal\Component\Utility\Html;
 use Drupal\Core\Site\Settings;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests the twig environment.
@@ -52,7 +52,7 @@ public function testInlineTemplate() {
     $settings['twig_auto_reload'] = TRUE;
 
     new Settings($settings);
-    $this->container = $this->kernel->rebuildContainer();
+    $this->container = \Drupal::service('kernel')->rebuildContainer();
     \Drupal::setContainer($this->container);
 
     $element = array();
diff --git a/core/modules/system/src/Tests/Theme/TwigWhiteListTest.php b/core/modules/system/tests/src/Kernel/Theme/TwigWhiteListTest.php
similarity index 95%
rename from core/modules/system/src/Tests/Theme/TwigWhiteListTest.php
rename to core/modules/system/tests/src/Kernel/Theme/TwigWhiteListTest.php
index edc0c91..e656762 100644
--- a/core/modules/system/src/Tests/Theme/TwigWhiteListTest.php
+++ b/core/modules/system/tests/src/Kernel/Theme/TwigWhiteListTest.php
@@ -1,17 +1,17 @@
 <?php
 /**
  * @file
- * Contains \Drupal\system\Tests\Theme\TwigWhiteListTest.php.
+ * Contains \Drupal\Tests\system\Kernel\Theme\TwigWhiteListTest.php.
  */
 
-namespace Drupal\system\Tests\Theme;
+namespace Drupal\Tests\system\Kernel\Theme;
 
 use Drupal\Core\Language\LanguageInterface;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
+use Drupal\KernelTests\KernelTestBase;
 use Drupal\node\Entity\Node;
 use Drupal\node\Entity\NodeType;
-use Drupal\simpletest\KernelTestBase;
 use Drupal\taxonomy\Entity\Term;
 use Drupal\taxonomy\Entity\Vocabulary;
 
diff --git a/core/modules/system/src/Tests/Update/CompatibilityFixTest.php b/core/modules/system/tests/src/Kernel/Update/CompatibilityFixTest.php
similarity index 87%
rename from core/modules/system/src/Tests/Update/CompatibilityFixTest.php
rename to core/modules/system/tests/src/Kernel/Update/CompatibilityFixTest.php
index 9ed5845..126092c 100644
--- a/core/modules/system/src/Tests/Update/CompatibilityFixTest.php
+++ b/core/modules/system/tests/src/Kernel/Update/CompatibilityFixTest.php
@@ -2,12 +2,12 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\Update\CompatibilityFixTest.
+ * Contains \Drupal\Tests\system\Kernel\Update\CompatibilityFixTest.
  */
 
-namespace Drupal\system\Tests\Update;
+namespace Drupal\Tests\system\Kernel\Update;
 
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests that extensions that are incompatible with the current core version are disabled.
@@ -16,6 +16,11 @@
  */
 class CompatibilityFixTest extends KernelTestBase {
 
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['system'];
+
   protected function setUp() {
     parent::setUp();
     require_once \Drupal::root() . '/core/includes/update.inc';
diff --git a/core/modules/system/src/Tests/Update/DbDumpTest.php b/core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php
similarity index 97%
rename from core/modules/system/src/Tests/Update/DbDumpTest.php
rename to core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php
index 230743d..ce49171 100644
--- a/core/modules/system/src/Tests/Update/DbDumpTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Command/DbDumpTest.php
@@ -2,17 +2,17 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\Update\DbDumpTest.
+ * Contains \Drupal\KernelTests\Core\Command\DbDumpTest.
  */
 
-namespace Drupal\system\Tests\Update;
+namespace Drupal\KernelTests\Core\Command;
 
 use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Core\Command\DbDumpApplication;
 use Drupal\Core\Config\DatabaseStorage;
 use Drupal\Core\Database\Database;
 use Drupal\Core\DependencyInjection\ContainerBuilder;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 use Drupal\user\Entity\User;
 use Symfony\Component\Console\Tester\CommandTester;
 use Symfony\Component\DependencyInjection\Reference;
@@ -71,8 +71,8 @@ class DbDumpTest extends KernelTestBase {
    *
    * Register a database cache backend rather than memory-based.
    */
-  public function containerBuild(ContainerBuilder $container) {
-    parent::containerBuild($container);
+  public function register(ContainerBuilder $container) {
+    parent::register($container);
     $container->register('cache_factory', 'Drupal\Core\Cache\DatabaseBackendFactory')
       ->addArgument(new Reference('database'))
       ->addArgument(new Reference('cache_tags.invalidator.checksum'));
@@ -126,6 +126,7 @@ protected function setUp() {
       'cachetags',
       'config',
       'cache_bootstrap',
+      'cache_config',
       'cache_data',
       'cache_default',
       'cache_discovery',
diff --git a/core/modules/system/src/Tests/System/IgnoreReplicaSubscriberTest.php b/core/tests/Drupal/KernelTests/Core/EventSubscriber/IgnoreReplicaSubscriberTest.php
similarity index 89%
rename from core/modules/system/src/Tests/System/IgnoreReplicaSubscriberTest.php
rename to core/tests/Drupal/KernelTests/Core/EventSubscriber/IgnoreReplicaSubscriberTest.php
index 0ba18d6..5cc35f0 100644
--- a/core/modules/system/src/Tests/System/IgnoreReplicaSubscriberTest.php
+++ b/core/tests/Drupal/KernelTests/Core/EventSubscriber/IgnoreReplicaSubscriberTest.php
@@ -2,15 +2,15 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\System\IgnoreReplicaSubscriberTest.
+ * Contains \Drupal\KernelTests\Core\EventSubscriber\IgnoreReplicaSubscriberTest.
  */
 
-namespace Drupal\system\Tests\System;
+namespace Drupal\KernelTests\Core\EventSubscriber;
 
 use Drupal\Core\Database\Database;
 use Drupal\Core\EventSubscriber\ReplicaDatabaseIgnoreSubscriber;
 use Drupal\Core\DrupalKernel;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpKernel\HttpKernelInterface;
 use Symfony\Component\HttpKernel\Event\GetResponseEvent;
diff --git a/core/modules/system/src/Tests/File/HtaccessUnitTest.php b/core/tests/Drupal/KernelTests/Core/File/HtaccessUnitTest.php
similarity index 93%
rename from core/modules/system/src/Tests/File/HtaccessUnitTest.php
rename to core/tests/Drupal/KernelTests/Core/File/HtaccessUnitTest.php
index 4b7f39d..490f967 100644
--- a/core/modules/system/src/Tests/File/HtaccessUnitTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/HtaccessUnitTest.php
@@ -5,10 +5,11 @@
  * Contains \Drupal\system\Tests\File\HtaccessUnitTest.
  */
 
-namespace Drupal\system\Tests\File;
+namespace Drupal\KernelTests\Core\File;
 
 use Drupal\Component\Utility\SafeMarkup;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\Core\Site\Settings;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests .htaccess file saving.
@@ -22,8 +23,8 @@ class HtaccessUnitTest extends KernelTestBase {
    */
   function testHtaccessSave() {
     // Prepare test directories.
-    $public = $this->publicFilesDirectory . '/test/public';
-    $private = $this->publicFilesDirectory . '/test/private';
+    $public = Settings::get('file_public_path') . '/test/public';
+    $private = Settings::get('file_public_path') . '/test/private';
     $stream = 'public://test/stream';
 
     // Verify that file_save_htaccess() returns FALSE if .htaccess cannot be
diff --git a/core/modules/system/src/Tests/Form/TriggeringElementProgrammedUnitTest.php b/core/tests/Drupal/KernelTests/Core/Form/TriggeringElementProgrammedUnitTest.php
similarity index 95%
rename from core/modules/system/src/Tests/Form/TriggeringElementProgrammedUnitTest.php
rename to core/tests/Drupal/KernelTests/Core/Form/TriggeringElementProgrammedUnitTest.php
index ae6b82c..d63eb4c 100644
--- a/core/modules/system/src/Tests/Form/TriggeringElementProgrammedUnitTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Form/TriggeringElementProgrammedUnitTest.php
@@ -5,12 +5,12 @@
  * Contains \Drupal\system\Tests\Form\TriggeringElementProgrammedUnitTest.
  */
 
-namespace Drupal\system\Tests\Form;
+namespace Drupal\KernelTests\Core\Form;
 
 use Drupal\Core\Form\FormInterface;
 use Drupal\Core\Form\FormState;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests detection of triggering_element for programmed form submissions.
@@ -19,8 +19,6 @@
  */
 class TriggeringElementProgrammedUnitTest extends KernelTestBase implements FormInterface {
 
-  public static $modules = array('system');
-
   /**
    * {@inheritdoc}
    */
diff --git a/core/modules/system/src/Tests/HttpKernel/StackKernelIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/HttpKernel/StackKernelIntegrationTest.php
similarity index 94%
rename from core/modules/system/src/Tests/HttpKernel/StackKernelIntegrationTest.php
rename to core/tests/Drupal/KernelTests/Core/HttpKernel/StackKernelIntegrationTest.php
index d976b37..c4d7ec7 100644
--- a/core/modules/system/src/Tests/HttpKernel/StackKernelIntegrationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/HttpKernel/StackKernelIntegrationTest.php
@@ -5,10 +5,10 @@
  * Contains \Drupal\system\Tests\HttpKernel\StackKernelIntegrationTest.
  */
 
-namespace Drupal\system\Tests\HttpKernel;
+namespace Drupal\KernelTests\Core\HttpKernel;
 
-use Drupal\simpletest\KernelTestBase;
 use Drupal\Core\Url;
+use Drupal\KernelTests\KernelTestBase;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpKernel\HttpKernelInterface;
 
@@ -57,7 +57,7 @@ public function testLazyLateMiddlewares() {
     $this->assertFalse($this->container->getDefinition('http_kernel.basic')->isLazy(), 'lazy flag on http_kernel.basic definition is not set');
 
     \Drupal::service('module_installer')->install(['page_cache']);
-    $this->container = $this->kernel->rebuildContainer();
+    $this->container = \Drupal::service('kernel')->rebuildContainer();
 
     $this->assertFalse($this->container->getDefinition('http_middleware.reverse_proxy')->isLazy(), 'lazy flag on http_middleware.reverse_proxy definition is not set');
     $this->assertFalse($this->container->getDefinition('http_middleware.page_cache')->isLazy(), 'lazy flag on http_middleware.page_cache definition is not set');
diff --git a/core/modules/system/src/Tests/Installer/InstallerLanguageTest.php b/core/tests/Drupal/KernelTests/Core/Installer/InstallerLanguageTest.php
similarity index 96%
rename from core/modules/system/src/Tests/Installer/InstallerLanguageTest.php
rename to core/tests/Drupal/KernelTests/Core/Installer/InstallerLanguageTest.php
index 417cfd0..3d798b0 100644
--- a/core/modules/system/src/Tests/Installer/InstallerLanguageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Installer/InstallerLanguageTest.php
@@ -5,10 +5,10 @@
  * Contains \Drupal\system\Tests\Installer\InstallerLanguageTest.
  */
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\KernelTests\Core\Installer;
 
-use Drupal\simpletest\KernelTestBase;
 use Drupal\Core\StringTranslation\Translator\FileTranslation;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests for installer language support.
diff --git a/core/modules/system/src/Tests/KeyValueStore/KeyValueContentEntityStorageTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/KeyValueContentEntityStorageTest.php
similarity index 99%
rename from core/modules/system/src/Tests/KeyValueStore/KeyValueContentEntityStorageTest.php
rename to core/tests/Drupal/KernelTests/Core/KeyValueStore/KeyValueContentEntityStorageTest.php
index cd09af9..efc6b68 100644
--- a/core/modules/system/src/Tests/KeyValueStore/KeyValueContentEntityStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/KeyValueContentEntityStorageTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\KeyValueStore\KeyValueContentEntityStorageTest.
  */
 
-namespace Drupal\system\Tests\KeyValueStore;
+namespace Drupal\KernelTests\Core\KeyValueStore;
 
 use Drupal\Core\Entity\EntityMalformedException;
 use Drupal\Core\Entity\EntityStorageException;
diff --git a/core/modules/system/src/Tests/KeyValueStore/MemoryStorageTest.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/MemoryStorageTest.php
similarity index 74%
rename from core/modules/system/src/Tests/KeyValueStore/MemoryStorageTest.php
rename to core/tests/Drupal/KernelTests/Core/KeyValueStore/MemoryStorageTest.php
index 4c6ac0c..94ee630 100644
--- a/core/modules/system/src/Tests/KeyValueStore/MemoryStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/MemoryStorageTest.php
@@ -5,10 +5,11 @@
  * Contains \Drupal\system\Tests\KeyValueStore\MemoryStorageTest.
  */
 
-namespace Drupal\system\Tests\KeyValueStore;
+namespace Drupal\KernelTests\Core\KeyValueStore;
 
 use Drupal\Core\DependencyInjection\ContainerBuilder;
 use Drupal\Core\KeyValueStore\KeyValueFactory;
+use Drupal\KernelTests\Core\KeyValueStore\StorageTestBase;
 
 /**
  * Tests the key-value memory storage.
@@ -20,8 +21,8 @@ class MemoryStorageTest extends StorageTestBase {
   /**
    * {@inheritdoc}
    */
-  public function containerBuild(ContainerBuilder $container) {
-    parent::containerBuild($container);
+  public function register(ContainerBuilder $container) {
+    parent::register($container);
 
     $container->register('keyvalue.memory', 'Drupal\Core\KeyValueStore\KeyValueMemoryFactory');
     $parameter[KeyValueFactory::DEFAULT_SETTING] = 'keyvalue.memory';
diff --git a/core/modules/system/src/Tests/KeyValueStore/StorageTestBase.php b/core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php
similarity index 98%
rename from core/modules/system/src/Tests/KeyValueStore/StorageTestBase.php
rename to core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php
index dd9b248..7c39ef5 100644
--- a/core/modules/system/src/Tests/KeyValueStore/StorageTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php
@@ -5,9 +5,9 @@
  * Contains \Drupal\system\Tests\KeyValueStore\StorageTestBase.
  */
 
-namespace Drupal\system\Tests\KeyValueStore;
+namespace Drupal\KernelTests\Core\KeyValueStore;
 
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Base class for testing key-value storages.
diff --git a/core/modules/system/src/Tests/Lock/LockUnitTest.php b/core/tests/Drupal/KernelTests/Core/Lock/LockUnitTest.php
similarity index 96%
rename from core/modules/system/src/Tests/Lock/LockUnitTest.php
rename to core/tests/Drupal/KernelTests/Core/Lock/LockUnitTest.php
index b726add..f4c3393 100644
--- a/core/modules/system/src/Tests/Lock/LockUnitTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Lock/LockUnitTest.php
@@ -5,10 +5,10 @@
  * Contains \Drupal\system\Tests\Lock\LockUnitTest.
  */
 
-namespace Drupal\system\Tests\Lock;
+namespace Drupal\KernelTests\Core\Lock;
 
 use Drupal\Core\Lock\DatabaseLockBackend;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests the Database lock backend.
diff --git a/core/modules/system/src/Tests/Menu/MenuLinkDefaultIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkDefaultIntegrationTest.php
similarity index 95%
rename from core/modules/system/src/Tests/Menu/MenuLinkDefaultIntegrationTest.php
rename to core/tests/Drupal/KernelTests/Core/Menu/MenuLinkDefaultIntegrationTest.php
index d96b29c..560f156 100644
--- a/core/modules/system/src/Tests/Menu/MenuLinkDefaultIntegrationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkDefaultIntegrationTest.php
@@ -5,10 +5,10 @@
  * Contains \Drupal\system\Tests\Menu\MenuLinkDefaultIntegrationTest.
  */
 
-namespace Drupal\system\Tests\Menu;
+namespace Drupal\KernelTests\Core\Menu;
 
 use Drupal\Core\Menu\MenuTreeParameters;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests integration of static menu links.
@@ -23,7 +23,6 @@ class MenuLinkDefaultIntegrationTest extends KernelTestBase {
    * @var array
    */
   public static $modules = array(
-    'system',
     'menu_test',
   );
 
diff --git a/core/modules/system/src/Tests/Menu/MenuTreeStorageTest.php b/core/tests/Drupal/KernelTests/Core/Menu/MenuTreeStorageTest.php
similarity index 99%
rename from core/modules/system/src/Tests/Menu/MenuTreeStorageTest.php
rename to core/tests/Drupal/KernelTests/Core/Menu/MenuTreeStorageTest.php
index 482eea9..a82a87e 100644
--- a/core/modules/system/src/Tests/Menu/MenuTreeStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Menu/MenuTreeStorageTest.php
@@ -5,12 +5,12 @@
  * Contains \Drupal\system\Tests\Menu\MenuTreeStorageTest.
  */
 
-namespace Drupal\system\Tests\Menu;
+namespace Drupal\KernelTests\Core\Menu;
 
 use Drupal\Component\Plugin\Exception\PluginException;
 use Drupal\Core\Menu\MenuTreeParameters;
 use Drupal\Core\Menu\MenuTreeStorage;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests the menu tree storage.
@@ -36,13 +36,6 @@ class MenuTreeStorageTest extends KernelTestBase {
   protected $connection;
 
   /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = array('system');
-
-  /**
    * {@inheritdoc}
    */
   protected function setUp() {
diff --git a/core/modules/system/src/Tests/Path/AliasTest.php b/core/tests/Drupal/KernelTests/Core/Path/AliasTest.php
similarity index 99%
rename from core/modules/system/src/Tests/Path/AliasTest.php
rename to core/tests/Drupal/KernelTests/Core/Path/AliasTest.php
index 2ceb4c9..22373b3 100644
--- a/core/modules/system/src/Tests/Path/AliasTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Path/AliasTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\Path\AliasTest.
  */
 
-namespace Drupal\system\Tests\Path;
+namespace Drupal\KernelTests\Core\Path;
 
 use Drupal\Core\Cache\MemoryCounterBackend;
 use Drupal\Core\Path\AliasStorage;
diff --git a/core/modules/system/src/Tests/Path/PathUnitTestBase.php b/core/tests/Drupal/KernelTests/Core/Path/PathUnitTestBase.php
similarity index 85%
rename from core/modules/system/src/Tests/Path/PathUnitTestBase.php
rename to core/tests/Drupal/KernelTests/Core/Path/PathUnitTestBase.php
index f007750..b05e13e 100644
--- a/core/modules/system/src/Tests/Path/PathUnitTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Path/PathUnitTestBase.php
@@ -5,10 +5,11 @@
  * Contains \Drupal\system\Tests\Path\PathUnitTestBase.
  */
 
-namespace Drupal\system\Tests\Path;
+namespace Drupal\KernelTests\Core\Path;
 
-use Drupal\simpletest\KernelTestBase;
 use Drupal\Core\Database\Database;
+use Drupal\KernelTests\KernelTestBase;
+use Drupal\system\Tests\Path\UrlAliasFixtures;
 
 /**
  * Base class for Path/URL alias integration tests.
diff --git a/core/modules/system/src/Tests/Plugin/DerivativeTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/DerivativeTest.php
similarity index 97%
rename from core/modules/system/src/Tests/Plugin/DerivativeTest.php
rename to core/tests/Drupal/KernelTests/Core/Plugin/DerivativeTest.php
index 793eeee..57a633c 100644
--- a/core/modules/system/src/Tests/Plugin/DerivativeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/DerivativeTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\Plugin\DerivativeTest.
  */
 
-namespace Drupal\system\Tests\Plugin;
+namespace Drupal\KernelTests\Core\Plugin;
 
 /**
  * Tests that derivative plugins are correctly discovered.
diff --git a/core/modules/system/src/Tests/Plugin/Discovery/AnnotatedClassDiscoveryTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/AnnotatedClassDiscoveryTest.php
similarity index 94%
rename from core/modules/system/src/Tests/Plugin/Discovery/AnnotatedClassDiscoveryTest.php
rename to core/tests/Drupal/KernelTests/Core/Plugin/Discovery/AnnotatedClassDiscoveryTest.php
index 6cca8f5..58c095e 100644
--- a/core/modules/system/src/Tests/Plugin/Discovery/AnnotatedClassDiscoveryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/AnnotatedClassDiscoveryTest.php
@@ -5,9 +5,10 @@
  * Contains \Drupal\system\Tests\Plugin\Discovery\AnnotatedClassDiscoveryTest.
  */
 
-namespace Drupal\system\Tests\Plugin\Discovery;
+namespace Drupal\KernelTests\Core\Plugin\Discovery;
 
 use Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery;
+use Drupal\KernelTests\Core\Plugin\Discovery\DiscoveryTestBase;
 
 /**
  * Tests that plugins are correctly discovered using annotated classes.
diff --git a/core/modules/system/src/Tests/Plugin/Discovery/CustomAnnotationClassDiscoveryTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/CustomAnnotationClassDiscoveryTest.php
similarity index 92%
rename from core/modules/system/src/Tests/Plugin/Discovery/CustomAnnotationClassDiscoveryTest.php
rename to core/tests/Drupal/KernelTests/Core/Plugin/Discovery/CustomAnnotationClassDiscoveryTest.php
index 890329c..2ebe95c 100644
--- a/core/modules/system/src/Tests/Plugin/Discovery/CustomAnnotationClassDiscoveryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/CustomAnnotationClassDiscoveryTest.php
@@ -5,9 +5,10 @@
  * Contains \Drupal\system\Tests\Plugin\Discovery\CustomAnnotationClassDiscoveryTest.
  */
 
-namespace Drupal\system\Tests\Plugin\Discovery;
+namespace Drupal\KernelTests\Core\Plugin\Discovery;
 
 use Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery;
+use Drupal\KernelTests\Core\Plugin\Discovery\DiscoveryTestBase;
 
 /**
  * Tests that a custom annotation class is used.
diff --git a/core/modules/system/src/Tests/Plugin/Discovery/CustomDirectoryAnnotatedClassDiscoveryTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/CustomDirectoryAnnotatedClassDiscoveryTest.php
similarity index 97%
rename from core/modules/system/src/Tests/Plugin/Discovery/CustomDirectoryAnnotatedClassDiscoveryTest.php
rename to core/tests/Drupal/KernelTests/Core/Plugin/Discovery/CustomDirectoryAnnotatedClassDiscoveryTest.php
index 39e7caf..67d8e6e 100644
--- a/core/modules/system/src/Tests/Plugin/Discovery/CustomDirectoryAnnotatedClassDiscoveryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/CustomDirectoryAnnotatedClassDiscoveryTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\Plugin\Discovery\CustomDirectoryAnnotatedClassDiscoveryTest.
  */
 
-namespace Drupal\system\Tests\Plugin\Discovery;
+namespace Drupal\KernelTests\Core\Plugin\Discovery;
 
 use Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery;
 
diff --git a/core/modules/system/src/Tests/Plugin/Discovery/DiscoveryTestBase.php b/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/DiscoveryTestBase.php
similarity index 96%
rename from core/modules/system/src/Tests/Plugin/Discovery/DiscoveryTestBase.php
rename to core/tests/Drupal/KernelTests/Core/Plugin/Discovery/DiscoveryTestBase.php
index b6f5cc1..a376c06 100644
--- a/core/modules/system/src/Tests/Plugin/Discovery/DiscoveryTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/DiscoveryTestBase.php
@@ -5,10 +5,10 @@
  * Contains \Drupal\system\Tests\Plugin\Discovery\DiscoveryTestBase.
  */
 
-namespace Drupal\system\Tests\Plugin\Discovery;
+namespace Drupal\KernelTests\Core\Plugin\Discovery;
 
 use Drupal\Core\StringTranslation\TranslatableMarkup;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Base class for plugin discovery tests.
diff --git a/core/modules/system/src/Tests/Plugin/Discovery/StaticDiscoveryTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/StaticDiscoveryTest.php
similarity index 96%
rename from core/modules/system/src/Tests/Plugin/Discovery/StaticDiscoveryTest.php
rename to core/tests/Drupal/KernelTests/Core/Plugin/Discovery/StaticDiscoveryTest.php
index c527e02..2fb493f 100644
--- a/core/modules/system/src/Tests/Plugin/Discovery/StaticDiscoveryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/Discovery/StaticDiscoveryTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\Plugin\Discovery\StaticDiscoveryTest.
  */
 
-namespace Drupal\system\Tests\Plugin\Discovery;
+namespace Drupal\KernelTests\Core\Plugin\Discovery;
 
 use Drupal\Component\Plugin\Discovery\StaticDiscovery;
 
diff --git a/core/modules/system/src/Tests/Plugin/FactoryTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/FactoryTest.php
similarity index 98%
rename from core/modules/system/src/Tests/Plugin/FactoryTest.php
rename to core/tests/Drupal/KernelTests/Core/Plugin/FactoryTest.php
index 44cf55f..b97b234 100644
--- a/core/modules/system/src/Tests/Plugin/FactoryTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/FactoryTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\Plugin\FactoryTest.
  */
 
-namespace Drupal\system\Tests\Plugin;
+namespace Drupal\KernelTests\Core\Plugin;
 
 use Drupal\Component\Plugin\Exception\ExceptionInterface;
 
diff --git a/core/modules/system/src/Tests/Plugin/InspectionTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/InspectionTest.php
similarity index 97%
rename from core/modules/system/src/Tests/Plugin/InspectionTest.php
rename to core/tests/Drupal/KernelTests/Core/Plugin/InspectionTest.php
index 69f0a7e..90985f4 100644
--- a/core/modules/system/src/Tests/Plugin/InspectionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/InspectionTest.php
@@ -5,7 +5,7 @@
  * Contains \Drupal\system\Tests\Plugin\InspectionTest.
  */
 
-namespace Drupal\system\Tests\Plugin;
+namespace Drupal\KernelTests\Core\Plugin;
 
 /**
  * Tests that plugins implementing PluginInspectionInterface are inspectable.
diff --git a/core/modules/system/src/Tests/Plugin/PluginTestBase.php b/core/tests/Drupal/KernelTests/Core/Plugin/PluginTestBase.php
similarity index 98%
rename from core/modules/system/src/Tests/Plugin/PluginTestBase.php
rename to core/tests/Drupal/KernelTests/Core/Plugin/PluginTestBase.php
index b4d6c1d..7710056 100644
--- a/core/modules/system/src/Tests/Plugin/PluginTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Plugin/PluginTestBase.php
@@ -5,10 +5,10 @@
  * Contains \Drupal\system\Tests\Plugin\PluginTestBase.
  */
 
-namespace Drupal\system\Tests\Plugin;
+namespace Drupal\KernelTests\Core\Plugin;
 
 use Drupal\Core\Plugin\Context\ContextDefinition;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 use Drupal\plugin_test\Plugin\TestPluginManager;
 use Drupal\plugin_test\Plugin\MockBlockManager;
 use Drupal\plugin_test\Plugin\DefaultsTestPluginManager;
diff --git a/core/modules/system/src/Tests/Queue/QueueTest.php b/core/tests/Drupal/KernelTests/Core/Queue/QueueTest.php
similarity index 97%
rename from core/modules/system/src/Tests/Queue/QueueTest.php
rename to core/tests/Drupal/KernelTests/Core/Queue/QueueTest.php
index a1ab45e..03656ae 100644
--- a/core/modules/system/src/Tests/Queue/QueueTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Queue/QueueTest.php
@@ -5,12 +5,12 @@
  * Contains \Drupal\system\Tests\Queue\QueueTest.
  */
 
-namespace Drupal\system\Tests\Queue;
+namespace Drupal\KernelTests\Core\Queue;
 
 use Drupal\Core\Database\Database;
 use Drupal\Core\Queue\DatabaseQueue;
 use Drupal\Core\Queue\Memory;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Queues and dequeues a set of items to check the basic queue functionality.
diff --git a/core/modules/system/src/Tests/Render/ElementInfoIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/Render/ElementInfoIntegrationTest.php
similarity index 94%
rename from core/modules/system/src/Tests/Render/ElementInfoIntegrationTest.php
rename to core/tests/Drupal/KernelTests/Core/Render/ElementInfoIntegrationTest.php
index 1620253..c8453ca 100644
--- a/core/modules/system/src/Tests/Render/ElementInfoIntegrationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Render/ElementInfoIntegrationTest.php
@@ -5,9 +5,9 @@
  * Contains \Drupal\system\Tests\Render\ElementInfoIntegrationTest.
  */
 
-namespace Drupal\system\Tests\Render;
+namespace Drupal\KernelTests\Core\Render;
 
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests the element info.
diff --git a/core/modules/system/src/Tests/Routing/MatcherDumperTest.php b/core/tests/Drupal/KernelTests/Core/Routing/MatcherDumperTest.php
similarity index 97%
rename from core/modules/system/src/Tests/Routing/MatcherDumperTest.php
rename to core/tests/Drupal/KernelTests/Core/Routing/MatcherDumperTest.php
index f98d294..bfc042d 100644
--- a/core/modules/system/src/Tests/Routing/MatcherDumperTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Routing/MatcherDumperTest.php
@@ -2,14 +2,14 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\Routing\MatcherDumperTest.
+ * Contains \Drupal\KernelTests\Core\Routing\MatcherDumperTest.
  */
 
-namespace Drupal\system\Tests\Routing;
+namespace Drupal\KernelTests\Core\Routing;
 
 use Drupal\Core\KeyValueStore\KeyValueMemoryFactory;
 use Drupal\Core\State\State;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 use Symfony\Component\Routing\Route;
 use Symfony\Component\Routing\RouteCollection;
 use Drupal\Core\Database\Database;
diff --git a/core/modules/system/src/Tests/Session/AccountSwitcherTest.php b/core/tests/Drupal/KernelTests/Core/Session/AccountSwitcherTest.php
similarity index 94%
rename from core/modules/system/src/Tests/Session/AccountSwitcherTest.php
rename to core/tests/Drupal/KernelTests/Core/Session/AccountSwitcherTest.php
index edbf6b2..db6997a 100644
--- a/core/modules/system/src/Tests/Session/AccountSwitcherTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Session/AccountSwitcherTest.php
@@ -2,13 +2,13 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\Session\AccountSwitcherTest.
+ * Contains \Drupal\KernelTests\Core\Session\AccountSwitcherTest.
  */
 
-namespace Drupal\system\Tests\Session;
+namespace Drupal\KernelTests\Core\Session;
 
 use Drupal\Core\Session\UserSession;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Test case for account switching.
diff --git a/core/modules/system/src/Tests/System/SettingsRewriteTest.php b/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php
similarity index 87%
rename from core/modules/system/src/Tests/System/SettingsRewriteTest.php
rename to core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php
index 3e74337..f836e16 100644
--- a/core/modules/system/src/Tests/System/SettingsRewriteTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php
@@ -2,13 +2,13 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\System\SettingsRewriteTest.
+ * Contains \Drupal\KernelTests\Core\Site\SettingsRewriteTest.
  */
 
-namespace Drupal\system\Tests\System;
+namespace Drupal\KernelTests\Core\Site;
 
 use Drupal\Core\Site\Settings;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests the drupal_rewrite_settings() function.
@@ -16,6 +16,7 @@
  * @group system
  */
 class SettingsRewriteTest extends KernelTestBase {
+
   /**
    * Tests the drupal_rewrite_settings() function.
    */
@@ -101,9 +102,9 @@ function testDrupalRewriteSettings() {
     );
     foreach ($tests as $test) {
       $filename = Settings::get('file_public_path', $site_path . '/files') . '/mock_settings.php';
-      file_put_contents(\Drupal::root() . '/' . $filename, "<?php\n" . $test['original'] . "\n");
+      file_put_contents($filename, "<?php\n" . $test['original'] . "\n");
       drupal_rewrite_settings($test['settings'], $filename);
-      $this->assertEqual(file_get_contents(\Drupal::root() . '/' . $filename), "<?php\n" . $test['expected'] . "\n");
+      $this->assertEqual(file_get_contents($filename), "<?php\n" . $test['expected'] . "\n");
     }
 
     // Test that <?php gets added to the start of an empty settings file.
@@ -119,12 +120,12 @@ function testDrupalRewriteSettings() {
     );
     // Make an empty file.
     $filename = Settings::get('file_public_path', $site_path . '/files') . '/mock_settings.php';
-    file_put_contents(\Drupal::root() . '/' . $filename, "");
+    file_put_contents($filename, "");
 
     // Write the setting to the file.
     drupal_rewrite_settings($test['settings'], $filename);
 
     // Check that the result is just the php opening tag and the settings.
-    $this->assertEqual(file_get_contents(\Drupal::root() . '/' . $filename), "<?php\n" . $test['expected'] . "\n");
+    $this->assertEqual(file_get_contents($filename), "<?php\n" . $test['expected'] . "\n");
   }
 }
diff --git a/core/modules/system/src/Tests/Validation/AllowedValuesConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/AllowedValuesConstraintValidatorTest.php
similarity index 91%
rename from core/modules/system/src/Tests/Validation/AllowedValuesConstraintValidatorTest.php
rename to core/tests/Drupal/KernelTests/Core/TypedData/AllowedValuesConstraintValidatorTest.php
index 87c1903..f36fef5 100644
--- a/core/modules/system/src/Tests/Validation/AllowedValuesConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TypedData/AllowedValuesConstraintValidatorTest.php
@@ -2,13 +2,13 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\Validation\AllowedValuesConstraintValidatorTest.
+ * Contains \Drupal\KernelTests\Core\TypedData\AllowedValuesConstraintValidatorTest.
  */
 
-namespace Drupal\system\Tests\Validation;
+namespace Drupal\KernelTests\Core\TypedData;
 
 use Drupal\Core\TypedData\DataDefinition;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests AllowedValues validation constraint with both valid and invalid values.
diff --git a/core/modules/system/src/Tests/Validation/ComplexDataConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/ComplexDataConstraintValidatorTest.php
similarity index 94%
rename from core/modules/system/src/Tests/Validation/ComplexDataConstraintValidatorTest.php
rename to core/tests/Drupal/KernelTests/Core/TypedData/ComplexDataConstraintValidatorTest.php
index 5672280..67eefe8 100644
--- a/core/modules/system/src/Tests/Validation/ComplexDataConstraintValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TypedData/ComplexDataConstraintValidatorTest.php
@@ -2,14 +2,14 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\Validation\ComplexDataConstraintValidatorTest.
+ * Contains \Drupal\KernelTests\Core\TypedData\ComplexDataConstraintValidatorTest.
  */
 
-namespace Drupal\system\Tests\Validation;
+namespace Drupal\KernelTests\Core\TypedData;
 
 use Drupal\Core\TypedData\DataDefinition;
 use Drupal\Core\TypedData\MapDataDefinition;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests ComplexData validation constraint with both valid and invalid values
diff --git a/core/modules/system/src/Tests/TypedData/TypedDataDefinitionTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataDefinitionTest.php
similarity index 96%
rename from core/modules/system/src/Tests/TypedData/TypedDataDefinitionTest.php
rename to core/tests/Drupal/KernelTests/Core/TypedData/TypedDataDefinitionTest.php
index f534dd8..83b3474 100644
--- a/core/modules/system/src/Tests/TypedData/TypedDataDefinitionTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataDefinitionTest.php
@@ -2,10 +2,10 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\TypedData\TypedDataDefinitionTest.
+ * Contains \Drupal\KernelTests\Core\TypedData\TypedDataDefinitionTest.
  */
 
-namespace Drupal\system\Tests\TypedData;
+namespace Drupal\KernelTests\Core\TypedData;
 
 use Drupal\Core\TypedData\ComplexDataDefinitionInterface;
 use Drupal\Core\TypedData\DataDefinition;
@@ -15,7 +15,7 @@
 use Drupal\Core\TypedData\ListDataDefinition;
 use Drupal\Core\TypedData\ListDataDefinitionInterface;
 use Drupal\Core\TypedData\MapDataDefinition;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests deriving metadata of core data types.
diff --git a/core/modules/system/src/Tests/TypedData/TypedDataTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
similarity index 99%
rename from core/modules/system/src/Tests/TypedData/TypedDataTest.php
rename to core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
index 8c24946..99ce7f9 100644
--- a/core/modules/system/src/Tests/TypedData/TypedDataTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php
@@ -2,10 +2,10 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\TypedData\TypedDataTest.
+ * Contains \Drupal\KernelTests\Core\TypedData\TypedDataTest.
  */
 
-namespace Drupal\system\Tests\TypedData;
+namespace Drupal\KernelTests\Core\TypedData;
 
 use Drupal\Core\Field\BaseFieldDefinition;
 use Drupal\Core\TypedData\DataDefinition;
@@ -13,8 +13,8 @@
 use Drupal\Core\TypedData\MapDataDefinition;
 use Drupal\Core\TypedData\TypedDataInterface;
 use Drupal\file\Entity\File;
-use Drupal\simpletest\KernelTestBase;
 use Drupal\Core\Datetime\DrupalDateTime;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests the functionality of all core data types.
diff --git a/core/modules/system/src/Tests/Utility/LinkGenerationTest.php b/core/tests/Drupal/KernelTests/Core/Url/LinkGenerationTest.php
similarity index 94%
rename from core/modules/system/src/Tests/Utility/LinkGenerationTest.php
rename to core/tests/Drupal/KernelTests/Core/Url/LinkGenerationTest.php
index d2d6e9a..c494517 100644
--- a/core/modules/system/src/Tests/Utility/LinkGenerationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Url/LinkGenerationTest.php
@@ -2,15 +2,15 @@
 
 /**
  * @file
- * Contains \Drupal\system\Tests\Utility\LinkGenerationTest.
+ * Contains \Drupal\KernelTests\Core\Url\LinkGenerationTest.
  */
 
-namespace Drupal\system\Tests\Utility;
+namespace Drupal\KernelTests\Core\Url;
 
 use Drupal\Component\Render\MarkupInterface;
 use Drupal\Core\Render\RenderContext;
 use Drupal\Core\Url;
-use Drupal\simpletest\KernelTestBase;
+use Drupal\KernelTests\KernelTestBase;
 
 /**
  * Tests link generation with hooks.
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Discovery/DerivativeDiscoveryDecoratorTest.php b/core/tests/Drupal/Tests/Core/Plugin/Discovery/DerivativeDiscoveryDecoratorTest.php
index 70d01ec..64c7ae4 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Discovery/DerivativeDiscoveryDecoratorTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Discovery/DerivativeDiscoveryDecoratorTest.php
@@ -116,14 +116,14 @@ public function testNonExistentDerivativeFetcher() {
    * @see \Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator::getDeriver().\
    *
    * @expectedException \Drupal\Component\Plugin\Exception\InvalidDeriverException
-   * @expectedExceptionMessage Plugin (invalid_discovery) deriver "\Drupal\system\Tests\Plugin\DerivativeTest" must implement \Drupal\Component\Plugin\Derivative\DeriverInterface.
+   * @expectedExceptionMessage Plugin (invalid_discovery) deriver "\Drupal\KernelTests\Core\Plugin\DerivativeTest" must implement \Drupal\Component\Plugin\Derivative\DeriverInterface.
    */
   public function testInvalidDerivativeFetcher() {
     $definitions = array();
     // Do this with a class that doesn't implement the interface.
     $definitions['invalid_discovery'] = array(
       'id' => 'invalid_discovery',
-      'deriver' => '\Drupal\system\Tests\Plugin\DerivativeTest',
+      'deriver' => '\Drupal\KernelTests\Core\Plugin\DerivativeTest',
     );
     $this->discoveryMain->expects($this->any())
       ->method('getDefinitions')
