diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index e5f286cabc..e7861df754 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -156,6 +156,7 @@ function install_drupal($class_loader, $settings = []) {
       install_display_output($output, $state);
     }
     elseif ($state['installation_finished']) {
+      clearstatcache();
       // Redirect to the newly installed site.
       install_goto('');
     }
diff --git a/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
index f9f97ecaa8..fdf41a1317 100644
--- a/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
+++ b/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
@@ -519,7 +519,7 @@ protected function installParameters() {
    *   Thrown when no SIMPLETEST_BASE_URL environment variable is provided.
    */
   protected function setupBaseUrl() {
-    global $base_url;
+    global $base_url, $base_path;
 
     // Get and set the domain of the environment we are running our test
     // coverage against.
@@ -533,7 +533,7 @@ protected function setupBaseUrl() {
     // Setup $_SERVER variable.
     $parsed_url = parse_url($base_url);
     $host = $parsed_url['host'] . (isset($parsed_url['port']) ? ':' . $parsed_url['port'] : '');
-    $path = isset($parsed_url['path']) ? rtrim(rtrim($parsed_url['path']), '/') : '';
+    $base_path = $path = isset($parsed_url['path']) ? rtrim(rtrim($parsed_url['path']), '/') : '';
     $port = isset($parsed_url['port']) ? $parsed_url['port'] : 80;
 
     $this->baseUrl = $base_url;
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index 09a7aad57c..f2970f4b56 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -143,6 +143,12 @@
 
 $test_list = simpletest_script_get_test_list();
 
+if (in_array('Drupal\FunctionalTests\Installer\DistributionProfileExistingSettingsTest', $test_list)) {
+  $test_list = array_fill(0, 20, 'Drupal\FunctionalTests\Installer\DistributionProfileExistingSettingsTest');
+} else {
+  $test_list = [];
+}
+
 // Try to allocate unlimited time to run the tests.
 drupal_set_time_limit(0);
 simpletest_script_reporter_init();
diff --git a/core/tests/Drupal/FunctionalTests/Installer/ConfigAfterInstallerTestBase.php b/core/tests/Drupal/FunctionalTests/Installer/ConfigAfterInstallerTestBase.php
new file mode 100644
index 0000000000..48fdaf6896
--- /dev/null
+++ b/core/tests/Drupal/FunctionalTests/Installer/ConfigAfterInstallerTestBase.php
@@ -0,0 +1,43 @@
+<?php
+
+namespace Drupal\FunctionalTests\Installer;
+
+use Drupal\Core\Config\FileStorage;
+use Drupal\Core\Config\InstallStorage;
+use Drupal\Core\Config\StorageInterface;
+use Drupal\KernelTests\AssertConfigTrait;
+
+/**
+ * Provides a class for install profiles to check their installed config.
+ */
+abstract class ConfigAfterInstallerTestBase extends InstallerTestBase {
+
+  use AssertConfigTrait;
+
+  /**
+   * Ensures that all the installed config looks like the exported one.
+   *
+   * @param array $skipped_config
+   *   An array of skipped config.
+   */
+  protected function assertInstalledConfig(array $skipped_config) {
+    /** @var \Drupal\Core\Config\StorageInterface $active_config_storage */
+    $active_config_storage = $this->container->get('config.storage');
+    /** @var \Drupal\Core\Config\ConfigManagerInterface $config_manager */
+    $config_manager = $this->container->get('config.manager');
+
+    $default_install_path = 'core/profiles/' . $this->profile . '/' . InstallStorage::CONFIG_INSTALL_DIRECTORY;
+    $profile_config_storage = new FileStorage($default_install_path, StorageInterface::DEFAULT_COLLECTION);
+
+    foreach ($profile_config_storage->listAll() as $config_name) {
+      $result = $config_manager->diff($profile_config_storage, $active_config_storage, $config_name);
+      try {
+        $this->assertConfigDiff($result, $config_name, $skipped_config);
+      }
+      catch (\Exception $e) {
+        $this->fail($e->getMessage());
+      }
+    }
+  }
+
+}
diff --git a/core/modules/system/src/Tests/Installer/DistributionProfileExistingSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php
similarity index 96%
rename from core/modules/system/src/Tests/Installer/DistributionProfileExistingSettingsTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php
index 48b9fcb753..f5bcf43df8 100644
--- a/core/modules/system/src/Tests/Installer/DistributionProfileExistingSettingsTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php
@@ -1,12 +1,11 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\FunctionalTests\Installer;
 
 use Drupal\Component\Serialization\Yaml;
 use Drupal\Core\Database\Database;
 use Drupal\Core\DrupalKernel;
 use Drupal\Core\Site\Settings;
-use Drupal\simpletest\InstallerTestBase;
 use Symfony\Component\HttpFoundation\Request;
 
 /**
@@ -26,7 +25,8 @@ class DistributionProfileExistingSettingsTest extends InstallerTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function prepareEnvironment() {
+    parent::prepareEnvironment();
     $this->info = [
       'type' => 'profile',
       'core' => \Drupal::CORE_COMPATIBILITY,
@@ -71,7 +71,6 @@ protected function setUp() {
       ],
     ];
     mkdir($this->settings['config_directories'][CONFIG_SYNC_DIRECTORY]->value, 0777, TRUE);
-    parent::setUp();
   }
 
   /**
diff --git a/core/modules/system/src/Tests/Installer/DistributionProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php
similarity index 93%
rename from core/modules/system/src/Tests/Installer/DistributionProfileTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php
index e52b0469bb..bf745bd4f8 100644
--- a/core/modules/system/src/Tests/Installer/DistributionProfileTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php
@@ -1,10 +1,9 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\FunctionalTests\Installer;
 
 use Drupal\Core\Serialization\Yaml;
 use Drupal\Core\Site\Settings;
-use Drupal\simpletest\InstallerTestBase;
 
 /**
  * Tests distribution profile support.
@@ -20,7 +19,8 @@ class DistributionProfileTest extends InstallerTestBase {
    */
   protected $info;
 
-  protected function setUp() {
+  protected function prepareEnvironment() {
+    parent::prepareEnvironment();
     $this->info = [
       'type' => 'profile',
       'core' => \Drupal::CORE_COMPATIBILITY,
@@ -36,8 +36,6 @@ protected function setUp() {
     $path = $this->siteDirectory . '/profiles/mydistro';
     mkdir($path, 0777, TRUE);
     file_put_contents("$path/mydistro.info.yml", Yaml::encode($this->info));
-
-    parent::setUp();
   }
 
   /**
diff --git a/core/modules/system/src/Tests/Installer/DistributionProfileTranslationQueryTest.php b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationQueryTest.php
similarity index 88%
rename from core/modules/system/src/Tests/Installer/DistributionProfileTranslationQueryTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationQueryTest.php
index 1b6868351d..69b69069c7 100644
--- a/core/modules/system/src/Tests/Installer/DistributionProfileTranslationQueryTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationQueryTest.php
@@ -1,16 +1,15 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\FunctionalTests\Installer;
 
 use Drupal\Core\Serialization\Yaml;
-use Drupal\simpletest\InstallerTestBase;
 
 /**
  * Tests distribution profile support with a 'langcode' query string.
  *
  * @group Installer
  *
- * @see \Drupal\system\Tests\Installer\DistributionProfileTranslationTest
+ * @see \Drupal\FunctionalTests\Installer\DistributionProfileTranslationTest
  */
 class DistributionProfileTranslationQueryTest extends InstallerTestBase {
 
@@ -29,7 +28,8 @@ class DistributionProfileTranslationQueryTest extends InstallerTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function prepareEnvironment() {
+    parent::prepareEnvironment();
     $this->info = [
       'type' => 'profile',
       'core' => \Drupal::CORE_COMPATIBILITY,
@@ -43,22 +43,19 @@ protected function setUp() {
       ],
     ];
     // File API functions are not available yet.
-    $path = $this->siteDirectory . '/profiles/mydistro';
+    $path = $this->root . DIRECTORY_SEPARATOR . $this->siteDirectory . '/profiles/mydistro';
     mkdir($path, 0777, TRUE);
     file_put_contents("$path/mydistro.info.yml", Yaml::encode($this->info));
-
-    parent::setUp();
+    // Place a custom local translation in the translations directory.
+    mkdir(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
+    file_put_contents(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de'));
+    file_put_contents(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.fr.po', $this->getPo('fr'));
   }
 
   /**
    * {@inheritdoc}
    */
   protected function visitInstaller() {
-    // Place a custom local translation in the translations directory.
-    mkdir(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
-    file_put_contents(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de'));
-    file_put_contents(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.fr.po', $this->getPo('fr'));
-
     // Pass a different language code than the one set in the distribution
     // profile. This distribution language should still be used.
     // The unrouted URL assembler does not exist at this point, so we build the
@@ -67,11 +64,11 @@ protected function visitInstaller() {
     // The language should have been automatically detected, all following
     // screens should be translated already.
     $elements = $this->xpath('//input[@type="submit"]/@value');
-    $this->assertEqual((string) current($elements), 'Save and continue de');
+    $this->assertEqual(current($elements)->getText(), 'Save and continue de');
     $this->translations['Save and continue'] = 'Save and continue de';
 
     // Check the language direction.
-    $direction = (string) current($this->xpath('/html/@dir'));
+    $direction = $this->getSession()->getPage()->find('xpath', '/@dir')->getText();
     $this->assertEqual($direction, 'ltr');
 
     // Verify that the distribution name appears.
diff --git a/core/modules/system/src/Tests/Installer/DistributionProfileTranslationTest.php b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationTest.php
similarity index 87%
rename from core/modules/system/src/Tests/Installer/DistributionProfileTranslationTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationTest.php
index 799affe37b..d052983208 100644
--- a/core/modules/system/src/Tests/Installer/DistributionProfileTranslationTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationTest.php
@@ -1,16 +1,15 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\FunctionalTests\Installer;
 
 use Drupal\Core\Serialization\Yaml;
-use Drupal\simpletest\InstallerTestBase;
 
 /**
  * Tests distribution profile support.
  *
  * @group Installer
  *
- * @see \Drupal\system\Tests\Installer\DistributionProfileTest
+ * @see \Drupal\FunctionalTests\Installer\DistributionProfileTest
  */
 class DistributionProfileTranslationTest extends InstallerTestBase {
 
@@ -29,7 +28,8 @@ class DistributionProfileTranslationTest extends InstallerTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function prepareEnvironment() {
+    parent::prepareEnvironment();
     $this->info = [
       'type' => 'profile',
       'core' => \Drupal::CORE_COMPATIBILITY,
@@ -43,31 +43,28 @@ protected function setUp() {
       ],
     ];
     // File API functions are not available yet.
-    $path = $this->siteDirectory . '/profiles/mydistro';
+    $path = $this->root . DIRECTORY_SEPARATOR . $this->siteDirectory . '/profiles/mydistro';
     mkdir($path, 0777, TRUE);
     file_put_contents("$path/mydistro.info.yml", Yaml::encode($this->info));
-
-    parent::setUp();
+    // Place a custom local translation in the translations directory.
+    mkdir(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
+    file_put_contents(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de'));
   }
 
   /**
    * {@inheritdoc}
    */
   protected function visitInstaller() {
-    // Place a custom local translation in the translations directory.
-    mkdir(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
-    file_put_contents(\Drupal::root() . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de'));
-
     parent::visitInstaller();
 
     // The language should have been automatically detected, all following
     // screens should be translated already.
     $elements = $this->xpath('//input[@type="submit"]/@value');
-    $this->assertEqual((string) current($elements), 'Save and continue de');
+    $this->assertEqual(current($elements)->getText(), 'Save and continue de');
     $this->translations['Save and continue'] = 'Save and continue de';
 
     // Check the language direction.
-    $direction = (string) current($this->xpath('/html/@dir'));
+    $direction = current($this->xpath('/@dir'))->getText();
     $this->assertEqual($direction, 'ltr');
 
     // Verify that the distribution name appears.
diff --git a/core/modules/system/src/Tests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php
similarity index 95%
rename from core/modules/system/src/Tests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php
index 2ab980fead..6be81af8bf 100644
--- a/core/modules/system/src/Tests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php
@@ -1,9 +1,8 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\FunctionalTests\Installer;
 
 use Drupal\Component\Utility\Crypt;
-use Drupal\simpletest\InstallerTestBase;
 
 /**
  * Tests the installer when a config_directory set up but does not exist.
diff --git a/core/modules/system/src/Tests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php
similarity index 91%
rename from core/modules/system/src/Tests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php
index 11febf2d6f..71e8b0594d 100644
--- a/core/modules/system/src/Tests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php
@@ -1,9 +1,8 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\FunctionalTests\Installer;
 
 use Drupal\Component\Utility\Crypt;
-use Drupal\simpletest\InstallerTestBase;
 
 /**
  * Tests the installer when a config_directory set up but does not exist.
@@ -22,7 +21,8 @@ class InstallerConfigDirectorySetNoDirectoryTest extends InstallerTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function prepareEnvironment() {
+    parent::prepareEnvironment();
     $this->syncDirectory = $this->publicFilesDirectory . '/config_' . Crypt::randomBytesBase64() . '/sync';
     $this->settings['config_directories'][CONFIG_SYNC_DIRECTORY] = (object) [
       'value' => $this->syncDirectory,
@@ -33,7 +33,6 @@ protected function setUp() {
       'value' => $this->publicFilesDirectory . '/config_custom',
       'required' => TRUE,
     ];
-    parent::setUp();
   }
 
   /**
diff --git a/core/modules/system/src/Tests/Installer/InstallerDatabaseErrorMessagesTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerDatabaseErrorMessagesTest.php
similarity index 92%
rename from core/modules/system/src/Tests/Installer/InstallerDatabaseErrorMessagesTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/InstallerDatabaseErrorMessagesTest.php
index c98a5de0b7..b6ad437677 100644
--- a/core/modules/system/src/Tests/Installer/InstallerDatabaseErrorMessagesTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerDatabaseErrorMessagesTest.php
@@ -1,9 +1,8 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\FunctionalTests\Installer;
 
 use Drupal\Core\Database\Database;
-use Drupal\simpletest\InstallerTestBase;
 
 /**
  * Tests the installer with database errors.
diff --git a/core/modules/system/src/Tests/Installer/InstallerEmptySettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php
similarity index 69%
rename from core/modules/system/src/Tests/Installer/InstallerEmptySettingsTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php
index 85fb889ae7..b2cb24ed2b 100644
--- a/core/modules/system/src/Tests/Installer/InstallerEmptySettingsTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php
@@ -1,8 +1,6 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
-
-use Drupal\simpletest\InstallerTestBase;
+namespace Drupal\FunctionalTests\Installer;
 
 /**
  * Tests the installer with empty settings file.
@@ -16,7 +14,9 @@ class InstallerEmptySettingsTest extends InstallerTestBase {
    */
   protected function setUp() {
     // Create an empty settings.php file.
-    touch($this->siteDirectory . '/settings.php');
+    $path = $this->root . DIRECTORY_SEPARATOR . $this->siteDirectory;
+    mkdir($path, 0777, TRUE);
+    file_put_contents($path . '/settings.php', '');
     parent::setUp();
   }
 
diff --git a/core/modules/system/src/Tests/Installer/InstallerExistingConfigDirectoryTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigDirectoryTest.php
similarity index 82%
rename from core/modules/system/src/Tests/Installer/InstallerExistingConfigDirectoryTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigDirectoryTest.php
index b06b4caf6e..2fd69fa511 100644
--- a/core/modules/system/src/Tests/Installer/InstallerExistingConfigDirectoryTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigDirectoryTest.php
@@ -1,8 +1,6 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
-
-use Drupal\simpletest\InstallerTestBase;
+namespace Drupal\FunctionalTests\Installer;
 
 /**
  * Tests the installer when a config_directory has already been set up.
@@ -21,14 +19,14 @@ class InstallerExistingConfigDirectoryTest extends InstallerTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
-    mkdir($this->siteDirectory . '/config_read_only', 0444);
+  protected function prepareEnvironment() {
+    parent::prepareEnvironment();
+    mkdir($this->root . DIRECTORY_SEPARATOR . $this->siteDirectory . '/config_read_only', 0444);
     $this->expectedFilePerms = fileperms($this->siteDirectory . '/config_read_only');
     $this->settings['config_directories'][CONFIG_SYNC_DIRECTORY] = (object) [
       'value' => $this->siteDirectory . '/config_read_only',
       'required' => TRUE,
     ];
-    parent::setUp();
   }
 
   /**
diff --git a/core/modules/system/src/Tests/Installer/InstallerExistingDatabaseSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingDatabaseSettingsTest.php
similarity index 95%
rename from core/modules/system/src/Tests/Installer/InstallerExistingDatabaseSettingsTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/InstallerExistingDatabaseSettingsTest.php
index 63d3ce407a..f62f9ea284 100644
--- a/core/modules/system/src/Tests/Installer/InstallerExistingDatabaseSettingsTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingDatabaseSettingsTest.php
@@ -1,8 +1,7 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\FunctionalTests\Installer;
 
-use Drupal\simpletest\InstallerTestBase;
 use Drupal\Core\Database\Database;
 
 /**
diff --git a/core/modules/system/src/Tests/Installer/InstallerExistingInstallationTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingInstallationTest.php
similarity index 90%
rename from core/modules/system/src/Tests/Installer/InstallerExistingInstallationTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/InstallerExistingInstallationTest.php
index 3ba045a0ad..94152df9fd 100644
--- a/core/modules/system/src/Tests/Installer/InstallerExistingInstallationTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingInstallationTest.php
@@ -1,8 +1,6 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
-
-use Drupal\simpletest\InstallerTestBase;
+namespace Drupal\FunctionalTests\Installer;
 
 /**
  * Tests the installer with an existing Drupal installation.
diff --git a/core/modules/system/src/Tests/Installer/InstallerExistingSettingsMismatchProfileBrokenTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsMismatchProfileBrokenTest.php
similarity index 97%
rename from core/modules/system/src/Tests/Installer/InstallerExistingSettingsMismatchProfileBrokenTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsMismatchProfileBrokenTest.php
index 6d866f0cf8..1a3a304b5f 100644
--- a/core/modules/system/src/Tests/Installer/InstallerExistingSettingsMismatchProfileBrokenTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsMismatchProfileBrokenTest.php
@@ -1,9 +1,8 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\FunctionalTests\Installer;
 
 use Drupal\Core\DrupalKernel;
-use Drupal\simpletest\InstallerTestBase;
 use Drupal\Core\Database\Database;
 use Symfony\Component\HttpFoundation\Request;
 
diff --git a/core/modules/system/src/Tests/Installer/InstallerExistingSettingsMismatchProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsMismatchProfileTest.php
similarity index 97%
rename from core/modules/system/src/Tests/Installer/InstallerExistingSettingsMismatchProfileTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsMismatchProfileTest.php
index 0349fe5152..12acbeb3cf 100644
--- a/core/modules/system/src/Tests/Installer/InstallerExistingSettingsMismatchProfileTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsMismatchProfileTest.php
@@ -1,10 +1,9 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\FunctionalTests\Installer;
 
 use Drupal\Core\DrupalKernel;
 use Drupal\Core\Site\Settings;
-use Drupal\simpletest\InstallerTestBase;
 use Drupal\Core\Database\Database;
 use Symfony\Component\HttpFoundation\Request;
 
diff --git a/core/modules/system/src/Tests/Installer/InstallerExistingSettingsNoProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsNoProfileTest.php
similarity index 93%
rename from core/modules/system/src/Tests/Installer/InstallerExistingSettingsNoProfileTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsNoProfileTest.php
index 3405cb598a..fdcd13c77f 100644
--- a/core/modules/system/src/Tests/Installer/InstallerExistingSettingsNoProfileTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsNoProfileTest.php
@@ -1,9 +1,8 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\FunctionalTests\Installer;
 
 use Drupal\Core\DrupalKernel;
-use Drupal\simpletest\InstallerTestBase;
 use Drupal\Core\Database\Database;
 use Symfony\Component\HttpFoundation\Request;
 
@@ -20,7 +19,9 @@ class InstallerExistingSettingsNoProfileTest extends InstallerTestBase {
    * Configures a preexisting settings.php file without an install_profile
    * setting before invoking the interactive installer.
    */
-  protected function setUp() {
+  protected function prepareEnvironment() {
+    parent::prepareEnvironment();
+
     // Pre-configure hash salt.
     // Any string is valid, so simply use the class name of this test.
     $this->settings['settings']['hash_salt'] = (object) [
@@ -46,8 +47,6 @@ protected function setUp() {
       ],
     ];
     mkdir($this->settings['config_directories'][CONFIG_SYNC_DIRECTORY]->value, 0777, TRUE);
-
-    parent::setUp();
   }
 
   /**
diff --git a/core/modules/system/src/Tests/Installer/InstallerExistingSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsTest.php
similarity index 94%
rename from core/modules/system/src/Tests/Installer/InstallerExistingSettingsTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsTest.php
index 4f09b6b7c0..a6059e150a 100644
--- a/core/modules/system/src/Tests/Installer/InstallerExistingSettingsTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsTest.php
@@ -1,9 +1,8 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\FunctionalTests\Installer;
 
 use Drupal\Core\Site\Settings;
-use Drupal\simpletest\InstallerTestBase;
 use Drupal\Core\Database\Database;
 use Drupal\Core\DrupalKernel;
 use Symfony\Component\HttpFoundation\Request;
@@ -21,7 +20,8 @@ class InstallerExistingSettingsTest extends InstallerTestBase {
    * Fully configures a preexisting settings.php file before invoking the
    * interactive installer.
    */
-  protected function setUp() {
+  protected function prepareEnvironment() {
+    parent::prepareEnvironment();
     // Pre-configure hash salt.
     // Any string is valid, so simply use the class name of this test.
     $this->settings['settings']['hash_salt'] = (object) [
@@ -57,8 +57,6 @@ protected function setUp() {
       ],
     ];
     mkdir($this->settings['config_directories'][CONFIG_SYNC_DIRECTORY]->value, 0777, TRUE);
-
-    parent::setUp();
   }
 
   /**
diff --git a/core/modules/system/src/Tests/Installer/InstallerLanguageDirectionTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguageDirectionTest.php
similarity index 85%
rename from core/modules/system/src/Tests/Installer/InstallerLanguageDirectionTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/InstallerLanguageDirectionTest.php
index 5e2c15a82d..da63ec9b30 100644
--- a/core/modules/system/src/Tests/Installer/InstallerLanguageDirectionTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguageDirectionTest.php
@@ -1,8 +1,6 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
-
-use Drupal\simpletest\InstallerTestBase;
+namespace Drupal\FunctionalTests\Installer;
 
 /**
  * Verifies that the early installer uses the correct language direction.
@@ -30,11 +28,11 @@ protected function setUpLanguage() {
     // After selecting a different language than English, all following screens
     // should be translated already.
     $elements = $this->xpath('//input[@type="submit"]/@value');
-    $this->assertEqual((string) current($elements), 'Save and continue Arabic');
+    $this->assertEqual(current($elements)->getText(), 'Save and continue Arabic');
     $this->translations['Save and continue'] = 'Save and continue Arabic';
 
     // Verify that language direction is right-to-left.
-    $direction = (string) current($this->xpath('/html/@dir'));
+    $direction = current($this->xpath('/@dir'))->getText();
     $this->assertEqual($direction, 'rtl');
   }
 
diff --git a/core/modules/system/src/Tests/Installer/InstallerLanguagePageTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguagePageTest.php
similarity index 93%
rename from core/modules/system/src/Tests/Installer/InstallerLanguagePageTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/InstallerLanguagePageTest.php
index ce3d1ecac2..a040da965c 100644
--- a/core/modules/system/src/Tests/Installer/InstallerLanguagePageTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguagePageTest.php
@@ -1,9 +1,8 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\FunctionalTests\Installer;
 
 use Drupal\Core\Language\LanguageManager;
-use Drupal\simpletest\InstallerTestBase;
 
 /**
  * Verifies that the installer language list combines local and remote languages.
diff --git a/core/modules/system/src/Tests/Installer/InstallerTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTest.php
similarity index 91%
rename from core/modules/system/src/Tests/Installer/InstallerTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/InstallerTest.php
index be51057ad8..809cf4b85d 100644
--- a/core/modules/system/src/Tests/Installer/InstallerTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTest.php
@@ -1,8 +1,6 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
-
-use Drupal\simpletest\InstallerTestBase;
+namespace Drupal\FunctionalTests\Installer;
 
 /**
  * Tests the interactive installer.
@@ -37,11 +35,11 @@ public function testInstaller() {
   protected function setUpLanguage() {
     // Test that \Drupal\Core\Render\BareHtmlPageRenderer adds assets and
     // metatags as expected to the first page of the installer.
-    $this->assertRaw('core/themes/seven/css/components/buttons.css');
+    $this->assertRaw("core/themes/seven/css/components/buttons.css");
     $this->assertRaw('<meta charset="utf-8" />');
 
     // Assert that the expected title is present.
-    $this->assertEqual('Choose language', $this->cssSelect('main h2')[0]);
+    $this->assertEqual('Choose language', $this->cssSelect('main h2')[0]->getText());
 
     parent::setUpLanguage();
   }
@@ -51,7 +49,7 @@ protected function setUpLanguage() {
    */
   protected function setUpProfile() {
     // Assert that the expected title is present.
-    $this->assertEqual('Select an installation profile', $this->cssSelect('main h2')[0]);
+    $this->assertEqual('Select an installation profile', $this->cssSelect('main h2')[0]->getText());
     $result = $this->xpath('//span[contains(@class, :class) and contains(text(), :text)]', [':class' => 'visually-hidden', ':text' => 'Select an installation profile']);
     $this->assertEqual(count($result), 1, "Title/Label not displayed when '#title_display' => 'invisible' attribute is set");
 
@@ -63,7 +61,7 @@ protected function setUpProfile() {
    */
   protected function setUpSettings() {
     // Assert that the expected title is present.
-    $this->assertEqual('Database configuration', $this->cssSelect('main h2')[0]);
+    $this->assertEqual('Database configuration', $this->cssSelect('main h2')[0]->getText());
 
     parent::setUpSettings();
   }
@@ -73,7 +71,7 @@ protected function setUpSettings() {
    */
   protected function setUpSite() {
     // Assert that the expected title is present.
-    $this->assertEqual('Configure site', $this->cssSelect('main h2')[0]);
+    $this->assertEqual('Configure site', $this->cssSelect('main h2')[0]->getText());
 
     parent::setUpSite();
   }
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php
new file mode 100644
index 0000000000..c396991a43
--- /dev/null
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php
@@ -0,0 +1,280 @@
+<?php
+
+namespace Drupal\FunctionalTests\Installer;
+
+require_once __DIR__ . '/../../../../includes/bootstrap.inc';
+
+use Drupal\Core\DrupalKernel;
+use Drupal\Core\Language\Language;
+use Drupal\Core\Session\UserSession;
+use Drupal\Core\Site\Settings;
+use Drupal\Core\Test\HttpClientMiddleware\TestHttpClientMiddleware;
+use Drupal\Tests\BrowserTestBase;
+use GuzzleHttp\HandlerStack;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Reference;
+use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\HttpFoundation\RequestStack;
+
+/**
+ * Base class for testing the interactive installer.
+ */
+abstract class InstallerTestBase extends BrowserTestBase {
+
+  /**
+   * Custom settings.php values to write for a test run.
+   *
+   * @var array
+   *   An array of settings to write out, in the format expected by
+   *   drupal_rewrite_settings().
+   */
+  protected $settings = [];
+
+  /**
+   * The language code in which to install Drupal.
+   *
+   * @var string
+   */
+  protected $langcode = 'en';
+
+  /**
+   * The installation profile to install.
+   *
+   * @var string
+   */
+  protected $profile = 'testing';
+
+  /**
+   * Additional parameters to use for installer screens.
+   *
+   * @see WebTestBase::installParameters()
+   *
+   * @var array
+   */
+  protected $parameters = [];
+
+  /**
+   * A string translation map used for translated installer screens.
+   *
+   * Keys are English strings, values are translated strings.
+   *
+   * @var array
+   */
+  protected $translations = [
+    'Save and continue' => 'Save and continue',
+  ];
+
+  /**
+   * Whether the installer has completed.
+   *
+   * @var bool
+   */
+  protected $isInstalled = FALSE;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function __construct($test_id = NULL) {
+    parent::__construct($test_id);
+    $this->setupBaseUrl();
+
+    // Install Drupal test site.
+    $this->prepareEnvironment();
+    $this->prepareDatabasePrefix();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    $this->isInstalled = FALSE;
+
+    $this->setupBaseUrl();
+
+    // Install Drupal test site.
+    $this->prepareEnvironment();
+
+    // Define information about the user 1 account.
+    $this->rootUser = new UserSession([
+      'uid' => 1,
+      'name' => 'admin',
+      'mail' => 'admin@example.com',
+      'pass_raw' => $this->randomMachineName(),
+    ]);
+
+    // If any $settings are defined for this test, copy and prepare an actual
+    // settings.php, so as to resemble a regular installation.
+    if (!empty($this->settings)) {
+      // Not using File API; a potential error must trigger a PHP warning.
+      copy(DRUPAL_ROOT . '/sites/default/default.settings.php', DRUPAL_ROOT . '/' . $this->siteDirectory . '/settings.php');
+      $this->writeSettings($this->settings);
+    }
+
+    // Note that WebTestBase::installParameters() returns form input values
+    // suitable for a programmed \Drupal::formBuilder()->submitForm().
+    // @see WebTestBase::translatePostValues()
+    $this->parameters = $this->installParameters();
+
+    // Set up a minimal container (required by BrowserTestBase). Set cookie and
+    // server information so that XDebug works.
+    // @see install_begin_request()
+    $request = Request::create($GLOBALS['base_url'] . '/core/install.php', 'GET', [], $_COOKIE, [], $_SERVER);
+    $this->container = new ContainerBuilder();
+    $request_stack = new RequestStack();
+    $request_stack->push($request);
+    $this->container
+      ->set('request_stack', $request_stack);
+    $this->container
+      ->setParameter('language.default_values', Language::$defaultValues);
+    $this->container
+      ->register('language.default', 'Drupal\Core\Language\LanguageDefault')
+      ->addArgument('%language.default_values%');
+    $this->container
+      ->register('string_translation', 'Drupal\Core\StringTranslation\TranslationManager')
+      ->addArgument(new Reference('language.default'));
+    $this->container
+      ->register('http_client', 'GuzzleHttp\Client')
+      ->setFactory('http_client_factory:fromOptions');
+    $this->container
+      ->register('http_client_factory', 'Drupal\Core\Http\ClientFactory')
+      ->setArguments([new Reference('http_handler_stack')]);
+    $handler_stack = HandlerStack::create();
+    $middleware = new TestHttpClientMiddleware();
+    $handler_stack->push($middleware(), 'test.http_client.middleware');
+    $this->container
+      ->set('http_handler_stack', $handler_stack);
+
+    $this->container
+      ->set('app.root', DRUPAL_ROOT);
+    \Drupal::setContainer($this->container);
+
+    // Setup Mink.
+    $this->initMink();
+
+    $this->visitInstaller();
+
+    // Select language.
+    $this->setUpLanguage();
+
+    // Select profile.
+    $this->setUpProfile();
+
+    // Configure settings.
+    $this->setUpSettings();
+
+    // @todo Allow test classes based on this class to act on further installer
+    //   screens.
+
+    // Configure site.
+    $this->setUpSite();
+
+    if ($this->isInstalled) {
+      // Import new settings.php written by the installer.
+      $request = Request::createFromGlobals();
+      $class_loader = require $this->container->get('app.root') . '/autoload.php';
+      Settings::initialize($this->container->get('app.root'), DrupalKernel::findSitePath($request), $class_loader);
+      foreach ($GLOBALS['config_directories'] as $type => $path) {
+        $this->configDirectories[$type] = $path;
+      }
+
+      // After writing settings.php, the installer removes write permissions
+      // from the site directory. To allow drupal_generate_test_ua() to write
+      // a file containing the private key for drupal_valid_test_ua(), the site
+      // directory has to be writable.
+      // WebTestBase::tearDown() will delete the entire test site directory.
+      // Not using File API; a potential error must trigger a PHP warning.
+      chmod($this->container->get('app.root') . '/' . $this->siteDirectory, 0777);
+      $this->kernel = DrupalKernel::createFromRequest($request, $class_loader, 'prod', FALSE);
+      $this->kernel->prepareLegacyRequest($request);
+      $this->container = $this->kernel->getContainer();
+
+      // Manually configure the test mail collector implementation to prevent
+      // tests from sending out emails and collect them in state instead.
+      $this->container->get('config.factory')
+        ->getEditable('system.mail')
+        ->set('interface.default', 'test_mail_collector')
+        ->save();
+    }
+  }
+
+  /**
+   * Visits the interactive installer.
+   */
+  protected function visitInstaller() {
+    $this->drupalGet($GLOBALS['base_url'] . '/core/install.php');
+  }
+
+  /**
+   * Installer step: Select language.
+   */
+  protected function setUpLanguage() {
+    $edit = [
+      'langcode' => $this->langcode,
+    ];
+    $this->drupalPostForm(NULL, $edit, $this->translations['Save and continue']);
+  }
+
+  /**
+   * Installer step: Select installation profile.
+   */
+  protected function setUpProfile() {
+    $edit = [
+      'profile' => $this->profile,
+    ];
+    $this->drupalPostForm(NULL, $edit, $this->translations['Save and continue']);
+  }
+
+  /**
+   * Installer step: Configure settings.
+   */
+  protected function setUpSettings() {
+    $edit = $this->translatePostValues($this->parameters['forms']['install_settings_form']);
+    $this->drupalPostForm(NULL, $edit, $this->translations['Save and continue']);
+  }
+
+  /**
+   * Final installer step: Configure site.
+   */
+  protected function setUpSite() {
+    $edit = $this->translatePostValues($this->parameters['forms']['install_configure_form']);
+    $this->drupalPostForm(NULL, $edit, $this->translations['Save and continue']);
+    // If we've got to this point the site is installed using the regular
+    // installation workflow.
+    $this->isInstalled = TRUE;
+  }
+
+  /**
+   * Transforms a nested array into a flat array suitable for BrowserTestBase::drupalPostForm().
+   *
+   * @param array $values
+   *   A multi-dimensional form values array to convert.
+   *
+   * @return array
+   *   The flattened $edit array suitable for BrowserTestBase::drupalPostForm().
+   */
+  protected function translatePostValues(array $values) {
+    $edit = [];
+    // The easiest and most straightforward way to translate values suitable for
+    // BrowserTestBase::drupalPostForm() is to actually build the POST data string
+    // and convert the resulting key/value pairs back into a flat array.
+    $query = http_build_query($values);
+    foreach (explode('&', $query) as $item) {
+      list($key, $value) = explode('=', $item);
+      $edit[urldecode($key)] = urldecode($value);
+    }
+    return $edit;
+  }
+
+  /**
+   * {@inheritdoc}
+   *
+   * WebTestBase::refreshVariables() tries to operate on persistent storage,
+   * which is only available after the installer completed.
+   */
+  protected function refreshVariables() {
+    if ($this->isInstalled) {
+      parent::refreshVariables();
+    }
+  }
+
+}
diff --git a/core/modules/system/src/Tests/Installer/InstallerTranslationMultipleLanguageForeignTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageForeignTest.php
similarity index 92%
rename from core/modules/system/src/Tests/Installer/InstallerTranslationMultipleLanguageForeignTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageForeignTest.php
index 8bf739bc5b..58100cdbf3 100644
--- a/core/modules/system/src/Tests/Installer/InstallerTranslationMultipleLanguageForeignTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageForeignTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\FunctionalTests\Installer;
 
 /**
  * Tests translation files for multiple languages get imported during install.
diff --git a/core/modules/system/src/Tests/Installer/InstallerTranslationMultipleLanguageKeepEnglishTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageKeepEnglishTest.php
similarity index 89%
rename from core/modules/system/src/Tests/Installer/InstallerTranslationMultipleLanguageKeepEnglishTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageKeepEnglishTest.php
index 5310af0656..3c103103a3 100644
--- a/core/modules/system/src/Tests/Installer/InstallerTranslationMultipleLanguageKeepEnglishTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageKeepEnglishTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\FunctionalTests\Installer;
 
 /**
  * Tests that keeping English in a foreign language install works.
diff --git a/core/modules/system/src/Tests/Installer/InstallerTranslationMultipleLanguageTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageTest.php
similarity index 98%
rename from core/modules/system/src/Tests/Installer/InstallerTranslationMultipleLanguageTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageTest.php
index a608cada77..bec5ef6417 100644
--- a/core/modules/system/src/Tests/Installer/InstallerTranslationMultipleLanguageTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageTest.php
@@ -1,8 +1,6 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
-
-use Drupal\simpletest\InstallerTestBase;
+namespace Drupal\FunctionalTests\Installer;
 
 /**
  * Tests translation files for multiple languages get imported during install.
diff --git a/core/modules/system/src/Tests/Installer/InstallerTranslationQueryTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationQueryTest.php
similarity index 87%
rename from core/modules/system/src/Tests/Installer/InstallerTranslationQueryTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationQueryTest.php
index 86c20f7c3f..8a6cc1e8c3 100644
--- a/core/modules/system/src/Tests/Installer/InstallerTranslationQueryTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationQueryTest.php
@@ -1,15 +1,13 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
-
-use Drupal\simpletest\InstallerTestBase;
+namespace Drupal\FunctionalTests\Installer;
 
 /**
  * Installs Drupal in German and checks resulting site.
  *
  * @group Installer
  *
- * @see \Drupal\system\Tests\Installer\InstallerTranslationTest
+ * @see \Drupal\FunctionalTests\Installer\InstallerTranslationTest
  */
 class InstallerTranslationQueryTest extends InstallerTestBase {
 
@@ -35,11 +33,11 @@ protected function visitInstaller() {
     // The language should have been automatically detected, all following
     // screens should be translated already.
     $elements = $this->xpath('//input[@type="submit"]/@value');
-    $this->assertEqual((string) current($elements), 'Save and continue de');
+    $this->assertEqual(current($elements)->getText(), 'Save and continue de');
     $this->translations['Save and continue'] = 'Save and continue de';
 
     // Check the language direction.
-    $direction = (string) current($this->xpath('/html/@dir'));
+    $direction = current($this->xpath('/@dir'))->getText();
     $this->assertEqual($direction, 'ltr');
   }
 
diff --git a/core/modules/system/src/Tests/Installer/InstallerTranslationTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php
similarity index 96%
rename from core/modules/system/src/Tests/Installer/InstallerTranslationTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php
index 7a803e700b..974d282588 100644
--- a/core/modules/system/src/Tests/Installer/InstallerTranslationTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php
@@ -1,9 +1,8 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\FunctionalTests\Installer;
 
 use Drupal\Core\Database\Database;
-use Drupal\simpletest\InstallerTestBase;
 use Drupal\user\Entity\User;
 
 /**
@@ -33,11 +32,11 @@ protected function setUpLanguage() {
     // After selecting a different language than English, all following screens
     // should be translated already.
     $elements = $this->xpath('//input[@type="submit"]/@value');
-    $this->assertEqual((string) current($elements), 'Save and continue de');
+    $this->assertEqual(current($elements)->getText(), 'Save and continue de');
     $this->translations['Save and continue'] = 'Save and continue de';
 
     // Check the language direction.
-    $direction = (string) current($this->xpath('/html/@dir'));
+    $direction = current($this->xpath('/@dir'))->getText();
     $this->assertEqual($direction, 'ltr');
   }
 
diff --git a/core/modules/system/src/Tests/Installer/MinimalInstallerTest.php b/core/tests/Drupal/FunctionalTests/Installer/MinimalInstallerTest.php
similarity index 91%
rename from core/modules/system/src/Tests/Installer/MinimalInstallerTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/MinimalInstallerTest.php
index eb6778d095..baefe0fe1c 100644
--- a/core/modules/system/src/Tests/Installer/MinimalInstallerTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/MinimalInstallerTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\FunctionalTests\Installer;
 
 use Drupal\KernelTests\AssertConfigTrait;
 
diff --git a/core/modules/system/src/Tests/Installer/MultipleDistributionsProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/MultipleDistributionsProfileTest.php
similarity index 91%
rename from core/modules/system/src/Tests/Installer/MultipleDistributionsProfileTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/MultipleDistributionsProfileTest.php
index 171a0afc31..1c01e72aeb 100644
--- a/core/modules/system/src/Tests/Installer/MultipleDistributionsProfileTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/MultipleDistributionsProfileTest.php
@@ -1,10 +1,9 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\FunctionalTests\Installer;
 
 use Drupal\Component\Serialization\Yaml;
 use Drupal\Core\Site\Settings;
-use Drupal\simpletest\InstallerTestBase;
 
 /**
  * Tests multiple distribution profile support.
@@ -23,7 +22,8 @@ class MultipleDistributionsProfileTest extends InstallerTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function prepareEnvironment() {
+    parent::prepareEnvironment();
     // Create two distributions.
     foreach (['distribution_one', 'distribution_two'] as $name) {
       $info = [
@@ -38,14 +38,12 @@ protected function setUp() {
         ],
       ];
       // File API functions are not available yet.
-      $path = $this->siteDirectory . '/profiles/' . $name;
+      $path = $this->root . DIRECTORY_SEPARATOR . $this->siteDirectory . '/profiles/' . $name;
       mkdir($path, 0777, TRUE);
       file_put_contents("$path/$name.info.yml", Yaml::encode($info));
     }
     // Install the first distribution.
     $this->profile = 'distribution_one';
-
-    parent::setUp();
   }
 
   /**
diff --git a/core/modules/system/src/Tests/Installer/SingleVisibleProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/SingleVisibleProfileTest.php
similarity index 89%
rename from core/modules/system/src/Tests/Installer/SingleVisibleProfileTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/SingleVisibleProfileTest.php
index 91af34a2d1..3a56dcd52d 100644
--- a/core/modules/system/src/Tests/Installer/SingleVisibleProfileTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/SingleVisibleProfileTest.php
@@ -1,9 +1,8 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\FunctionalTests\Installer;
 
 use Drupal\Core\Serialization\Yaml;
-use Drupal\simpletest\InstallerTestBase;
 
 /**
  * Tests distribution profile support.
@@ -28,7 +27,11 @@ class SingleVisibleProfileTest extends InstallerTestBase {
    */
   protected $info;
 
-  protected function setUp() {
+  /**
+   * {@inheritdoc}
+   */
+  protected function prepareEnvironment() {
+    parent::prepareEnvironment();
     $this->info = [
       'type' => 'profile',
       'core' => \Drupal::CORE_COMPATIBILITY,
@@ -39,8 +42,6 @@ protected function setUp() {
     $path = $this->siteDirectory . '/profiles/standard';
     mkdir($path, 0777, TRUE);
     file_put_contents("$path/standard.info.yml", Yaml::encode($this->info));
-
-    parent::setUp();
   }
 
   /**
diff --git a/core/modules/system/src/Tests/Installer/SiteNameTest.php b/core/tests/Drupal/FunctionalTests/Installer/SiteNameTest.php
similarity index 86%
rename from core/modules/system/src/Tests/Installer/SiteNameTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/SiteNameTest.php
index 081dfb16ac..b77fe35a72 100644
--- a/core/modules/system/src/Tests/Installer/SiteNameTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/SiteNameTest.php
@@ -1,15 +1,15 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\FunctionalTests\Installer;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests that the site name can be set during a non-interactive installation.
  *
  * @group Installer
  */
-class SiteNameTest extends WebTestBase {
+class SiteNameTest extends BrowserTestBase {
 
   /**
    * The site name to be used when testing.
diff --git a/core/modules/system/src/Tests/Installer/StandardInstallerTest.php b/core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php
similarity index 98%
rename from core/modules/system/src/Tests/Installer/StandardInstallerTest.php
rename to core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php
index b0ceef9427..119a7229bf 100644
--- a/core/modules/system/src/Tests/Installer/StandardInstallerTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\system\Tests\Installer;
+namespace Drupal\FunctionalTests\Installer;
 
 /**
  * Tests the interactive installer installing the standard profile.
