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