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/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.
