diff --git a/core/modules/config/src/Tests/AssertConfigEntityImportTrait.php b/core/modules/config/src/Tests/AssertConfigEntityImportTrait.php
index 044144483a..c150e7ed2b 100644
--- a/core/modules/config/src/Tests/AssertConfigEntityImportTrait.php
+++ b/core/modules/config/src/Tests/AssertConfigEntityImportTrait.php
@@ -2,36 +2,16 @@
 
 namespace Drupal\config\Tests;
 
-use Drupal\Core\Config\Entity\ConfigEntityInterface;
+@trigger_error('The ' . __NAMESPACE__ . '\AssertConfigEntityImportTrait is deprecated in Drupal 8.4.x and will be removed before Drupal 9.0.0. Instead, use \Drupal\Tests\config\Traits\AssertConfigEntityImportTrait', E_USER_DEPRECATED);
 
 /**
  * Provides test assertions for testing config entity synchronization.
  *
- * Can be used by test classes that extend \Drupal\simpletest\WebTestBase or
- * \Drupal\KernelTests\KernelTestBase.
+ * @deprecated in Drupal 8.4.x and will be removed before Drupal 9.0.0.
+ *   Use \Drupal\Tests\config\Traits\AssertConfigEntityImportTrait.
  */
 trait AssertConfigEntityImportTrait {
 
-  /**
-   * Asserts that a config entity can be imported without changing it.
-   *
-   * @param \Drupal\Core\Config\Entity\ConfigEntityInterface $entity
-   *   The config entity to test importing.
-   */
-  public function assertConfigEntityImport(ConfigEntityInterface $entity) {
-    // Save original config information.
-    $entity_uuid = $entity->uuid();
-    $entity_type_id = $entity->getEntityTypeId();
-    $original_data = $entity->toArray();
-    // Copy everything to sync.
-    $this->copyConfig(\Drupal::service('config.storage'), \Drupal::service('config.storage.sync'));
-    // Delete the configuration from active. Don't worry about side effects of
-    // deleting config like fields cleaning up field storages. The coming import
-    // should recreate everything as necessary.
-    $entity->delete();
-    $this->configImporter()->reset()->import();
-    $imported_entity = \Drupal::entityManager()->loadEntityByUuid($entity_type_id, $entity_uuid);
-    $this->assertIdentical($original_data, $imported_entity->toArray());
-  }
+  use \Drupal\Tests\config\Traits\AssertConfigEntityImportTrait;
 
 }
diff --git a/core/modules/config/src/Tests/CacheabilityMetadataConfigOverrideIntegrationTest.php b/core/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php
similarity index 89%
rename from core/modules/config/src/Tests/CacheabilityMetadataConfigOverrideIntegrationTest.php
rename to core/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php
index 3ef0754ea6..f2f8730a02 100644
--- a/core/modules/config/src/Tests/CacheabilityMetadataConfigOverrideIntegrationTest.php
+++ b/core/modules/config/tests/src/Functional/CacheabilityMetadataConfigOverrideIntegrationTest.php
@@ -1,15 +1,18 @@
 <?php
 
-namespace Drupal\config\Tests;
+namespace Drupal\Tests\config\Functional;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\system\Tests\Cache\AssertPageCacheContextsAndTagsTrait;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests if configuration overrides correctly affect cacheability metadata.
  *
  * @group config
  */
-class CacheabilityMetadataConfigOverrideIntegrationTest extends WebTestBase {
+class CacheabilityMetadataConfigOverrideIntegrationTest extends BrowserTestBase {
+
+  use AssertPageCacheContextsAndTagsTrait;
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/config/src/Tests/ConfigEntityFormOverrideTest.php b/core/modules/config/tests/src/Functional/ConfigEntityFormOverrideTest.php
similarity index 88%
rename from core/modules/config/src/Tests/ConfigEntityFormOverrideTest.php
rename to core/modules/config/tests/src/Functional/ConfigEntityFormOverrideTest.php
index 41419b031e..a4dc92c78a 100644
--- a/core/modules/config/src/Tests/ConfigEntityFormOverrideTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigEntityFormOverrideTest.php
@@ -1,15 +1,15 @@
 <?php
 
-namespace Drupal\config\Tests;
+namespace Drupal\Tests\config\Functional;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests that config overrides do not bleed through in entity forms and lists.
  *
  * @group config
  */
-class ConfigEntityFormOverrideTest extends WebTestBase {
+class ConfigEntityFormOverrideTest extends BrowserTestBase {
 
   /**
    * {@inheritdoc}
@@ -46,7 +46,7 @@ public function testFormsWithOverrides() {
     // Test that the original label on the editing page is intact.
     $this->drupalGet('admin/structure/config_test/manage/dotted.default');
     $elements = $this->xpath('//input[@name="label"]');
-    $this->assertIdentical((string) $elements[0]['value'], $original_label);
+    $this->assertIdentical($elements[0]->getValue(), $original_label);
     $this->assertNoText($overridden_label);
 
     // Change to a new label and test that the listing now has the edited label.
@@ -61,7 +61,7 @@ public function testFormsWithOverrides() {
     // Test that the editing page now has the edited label.
     $this->drupalGet('admin/structure/config_test/manage/dotted.default');
     $elements = $this->xpath('//input[@name="label"]');
-    $this->assertIdentical((string) $elements[0]['value'], $edited_label);
+    $this->assertIdentical($elements[0]->getValue(), $edited_label);
 
     // Test that the overridden label is still loaded with the entity.
     $this->assertEqual($config_test_storage->load('dotted.default')->label(), $overridden_label);
diff --git a/core/modules/config/src/Tests/ConfigEntityListTest.php b/core/modules/config/tests/src/Functional/ConfigEntityListTest.php
similarity index 96%
rename from core/modules/config/src/Tests/ConfigEntityListTest.php
rename to core/modules/config/tests/src/Functional/ConfigEntityListTest.php
index 46c0c064b6..ae9be133f6 100644
--- a/core/modules/config/src/Tests/ConfigEntityListTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigEntityListTest.php
@@ -1,18 +1,18 @@
 <?php
 
-namespace Drupal\config\Tests;
+namespace Drupal\Tests\config\Functional;
 
 use Drupal\Core\Routing\RedirectDestinationTrait;
-use Drupal\simpletest\WebTestBase;
 use Drupal\config_test\Entity\ConfigTest;
 use Drupal\Core\Entity\EntityStorageInterface;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests the listing of configuration entities.
  *
  * @group config
  */
-class ConfigEntityListTest extends WebTestBase {
+class ConfigEntityListTest extends BrowserTestBase {
 
   use RedirectDestinationTrait;
 
@@ -171,7 +171,7 @@ public function testListUI() {
     // Test the contents of each th cell.
     $expected_items = ['Label', 'Machine name', 'Operations'];
     foreach ($elements as $key => $element) {
-      $this->assertIdentical((string) $element[0], $expected_items[$key]);
+      $this->assertIdentical($element->getText(), $expected_items[$key]);
     }
 
     // Check the number of table row cells.
@@ -181,9 +181,9 @@ public function testListUI() {
     // Check the contents of each row cell. The first cell contains the label,
     // the second contains the machine name, and the third contains the
     // operations list.
-    $this->assertIdentical((string) $elements[0], 'Default');
-    $this->assertIdentical((string) $elements[1], 'dotted.default');
-    $this->assertTrue($elements[2]->children()->xpath('//ul'), 'Operations list found.');
+    $this->assertIdentical($elements[0]->getText(), 'Default');
+    $this->assertIdentical($elements[1]->getText(), 'dotted.default');
+    $this->assertNotEmpty($elements[2]->find('xpath', '//ul'), 'Operations list found.');
 
     // Add a new entity using the operations link.
     $this->assertLink('Add test configuration');
diff --git a/core/modules/config/src/Tests/ConfigEntityTest.php b/core/modules/config/tests/src/Functional/ConfigEntityTest.php
similarity index 99%
rename from core/modules/config/src/Tests/ConfigEntityTest.php
rename to core/modules/config/tests/src/Functional/ConfigEntityTest.php
index 2cd47ff8bf..5b237c4dea 100644
--- a/core/modules/config/src/Tests/ConfigEntityTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigEntityTest.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\config\Tests;
+namespace Drupal\Tests\config\Functional;
 
 use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Core\Entity\EntityMalformedException;
@@ -8,14 +8,14 @@
 use Drupal\Core\Config\Entity\ConfigEntityStorage;
 use Drupal\Core\Config\Entity\Exception\ConfigEntityIdLengthException;
 use Drupal\Core\Url;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests configuration entities.
  *
  * @group config
  */
-class ConfigEntityTest extends WebTestBase {
+class ConfigEntityTest extends BrowserTestBase {
 
   /**
    * The maximum length for the entity storage used in this test.
diff --git a/core/modules/config/src/Tests/ConfigExportImportUITest.php b/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php
similarity index 99%
rename from core/modules/config/src/Tests/ConfigExportImportUITest.php
rename to core/modules/config/tests/src/Functional/ConfigExportImportUITest.php
index 9ba59a85ca..96a80a606f 100644
--- a/core/modules/config/src/Tests/ConfigExportImportUITest.php
+++ b/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php
@@ -1,12 +1,12 @@
 <?php
 
-namespace Drupal\config\Tests;
+namespace Drupal\Tests\config\Functional;
 
 use Drupal\Component\Utility\Unicode;
 use Drupal\Core\Archiver\ArchiveTar;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests the user interface for importing/exporting configuration.
@@ -17,7 +17,7 @@
  *
  * @group config
  */
-class ConfigExportImportUITest extends WebTestBase {
+class ConfigExportImportUITest extends BrowserTestBase {
 
   /**
    * The contents of the config export tarball, held between test methods.
diff --git a/core/modules/config/src/Tests/ConfigExportUITest.php b/core/modules/config/tests/src/Functional/ConfigExportUITest.php
similarity index 87%
rename from core/modules/config/src/Tests/ConfigExportUITest.php
rename to core/modules/config/tests/src/Functional/ConfigExportUITest.php
index c9f53b36fd..d92071e89d 100644
--- a/core/modules/config/src/Tests/ConfigExportUITest.php
+++ b/core/modules/config/tests/src/Functional/ConfigExportUITest.php
@@ -1,17 +1,17 @@
 <?php
 
-namespace Drupal\config\Tests;
+namespace Drupal\Tests\config\Functional;
 
 use Drupal\Core\Archiver\Tar;
 use Drupal\Core\Serialization\Yaml;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests the user interface for exporting configuration.
  *
  * @group config
  */
-class ConfigExportUITest extends WebTestBase {
+class ConfigExportUITest extends BrowserTestBase {
 
   /**
    * Modules to enable.
@@ -44,7 +44,8 @@ public function testExport() {
     $this->drupalGet('admin/config/development/configuration/full/export');
     $this->assertFieldById('edit-submit', t('Export'));
 
-    // Submit the export form and verify response.
+    // Submit the export form and verify response. This will create a file in
+    // temporary directory with the default name config.tar.gz.
     $this->drupalPostForm('admin/config/development/configuration/full/export', [], t('Export'));
     $this->assertResponse(200, 'User can access the download callback.');
 
@@ -55,14 +56,8 @@ public function testExport() {
     $header_match = (boolean) preg_match('/attachment; filename="config-' . preg_quote($hostname) . '-\d{4}-\d{2}-\d{2}-\d{2}-\d{2}\.tar\.gz"/', $header_content_disposition);
     $this->assertTrue($header_match, "Header with filename matches the expected format.");
 
-    // Get the archived binary file provided to user for download.
-    $archive_data = $this->getRawContent();
-
-    // Temporarily save the archive file.
-    $uri = file_unmanaged_save_data($archive_data, 'temporary://config.tar.gz');
-
     // Extract the archive and verify it's not empty.
-    $file_path = file_directory_temp() . '/' . file_uri_target($uri);
+    $file_path = file_directory_temp() . '/' . 'config.tar.gz';
     $archiver = new Tar($file_path);
     $archive_contents = $archiver->listContents();
     $this->assert(!empty($archive_contents), 'Downloaded archive file is not empty.');
diff --git a/core/modules/config/src/Tests/ConfigFormOverrideTest.php b/core/modules/config/tests/src/Functional/ConfigFormOverrideTest.php
similarity index 82%
rename from core/modules/config/src/Tests/ConfigFormOverrideTest.php
rename to core/modules/config/tests/src/Functional/ConfigFormOverrideTest.php
index f721eeba74..3bba16daa7 100644
--- a/core/modules/config/src/Tests/ConfigFormOverrideTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigFormOverrideTest.php
@@ -1,8 +1,8 @@
 <?php
 
-namespace Drupal\config\Tests;
+namespace Drupal\Tests\config\Functional;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests config overrides do not appear on forms that extend ConfigFormBase.
@@ -10,7 +10,7 @@
  * @group config
  * @see \Drupal\Core\Form\ConfigFormBase
  */
-class ConfigFormOverrideTest extends WebTestBase {
+class ConfigFormOverrideTest extends BrowserTestBase {
 
   /**
    * Tests that overrides do not affect forms.
@@ -32,7 +32,7 @@ public function testFormsWithOverrides() {
     $this->drupalGet('admin/config/system/site-information');
     $this->assertTitle('Basic site settings | ' . $overridden_name);
     $elements = $this->xpath('//input[@name="site_name"]');
-    $this->assertIdentical((string) $elements[0]['value'], 'Drupal');
+    $this->assertIdentical($elements[0]->getValue(), 'Drupal');
 
     // Submit the form and ensure the site name is not changed.
     $edit = [
@@ -41,7 +41,7 @@ public function testFormsWithOverrides() {
     $this->drupalPostForm('admin/config/system/site-information', $edit, t('Save configuration'));
     $this->assertTitle('Basic site settings | ' . $overridden_name);
     $elements = $this->xpath('//input[@name="site_name"]');
-    $this->assertIdentical((string) $elements[0]['value'], $edit['site_name']);
+    $this->assertIdentical($elements[0]->getValue(), $edit['site_name']);
   }
 
 }
diff --git a/core/modules/config/src/Tests/ConfigImportAllTest.php b/core/modules/config/tests/src/Functional/ConfigImportAllTest.php
similarity index 97%
rename from core/modules/config/src/Tests/ConfigImportAllTest.php
rename to core/modules/config/tests/src/Functional/ConfigImportAllTest.php
index 459be7a24f..0608681dd7 100644
--- a/core/modules/config/src/Tests/ConfigImportAllTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigImportAllTest.php
@@ -1,12 +1,13 @@
 <?php
 
-namespace Drupal\config\Tests;
+namespace Drupal\Tests\config\Functional;
 
 use Drupal\Core\Config\StorageComparer;
 use Drupal\filter\Entity\FilterFormat;
-use Drupal\system\Tests\Module\ModuleTestBase;
 use Drupal\shortcut\Entity\Shortcut;
 use Drupal\taxonomy\Entity\Term;
+use Drupal\Tests\SchemaCheckTestTrait;
+use Drupal\Tests\system\Functional\Module\ModuleTestBase;
 
 /**
  * Tests the largest configuration import possible with all available modules.
diff --git a/core/modules/config/src/Tests/ConfigImportInstallProfileTest.php b/core/modules/config/tests/src/Functional/ConfigImportInstallProfileTest.php
similarity index 94%
rename from core/modules/config/src/Tests/ConfigImportInstallProfileTest.php
rename to core/modules/config/tests/src/Functional/ConfigImportInstallProfileTest.php
index eaece36db3..8b0787d6ee 100644
--- a/core/modules/config/src/Tests/ConfigImportInstallProfileTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigImportInstallProfileTest.php
@@ -1,15 +1,15 @@
 <?php
 
-namespace Drupal\config\Tests;
+namespace Drupal\Tests\config\Functional;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests the importing/exporting configuration based on the install profile.
  *
  * @group config
  */
-class ConfigImportInstallProfileTest extends WebTestBase {
+class ConfigImportInstallProfileTest extends BrowserTestBase {
 
   /**
    * The profile to install as a basis for testing.
diff --git a/core/modules/config/src/Tests/ConfigImportUITest.php b/core/modules/config/tests/src/Functional/ConfigImportUITest.php
similarity index 99%
rename from core/modules/config/src/Tests/ConfigImportUITest.php
rename to core/modules/config/tests/src/Functional/ConfigImportUITest.php
index 772dadadd2..fd76990da6 100644
--- a/core/modules/config/src/Tests/ConfigImportUITest.php
+++ b/core/modules/config/tests/src/Functional/ConfigImportUITest.php
@@ -1,18 +1,18 @@
 <?php
 
-namespace Drupal\config\Tests;
+namespace Drupal\Tests\config\Functional;
 
 use Drupal\Component\Utility\Html;
 use Drupal\Component\Utility\SafeMarkup;
 use Drupal\Core\Config\InstallStorage;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
- * Tests the user interface for importing/exporting configuration.
+ * Tests the user interface for importing configuration.
  *
  * @group config
  */
-class ConfigImportUITest extends WebTestBase {
+class ConfigImportUITest extends BrowserTestBase {
 
   /**
    * Modules to install.
@@ -130,6 +130,7 @@ public function testImport() {
     // Verify that there are no further changes to import.
     $this->assertText(t('There are no configuration changes to import.'));
 
+    $this->rebuildContainer();
     // Verify site name has changed.
     $this->assertIdentical($new_site_name, $this->config('system.site')->get('name'));
 
diff --git a/core/modules/config/src/Tests/ConfigImportUploadTest.php b/core/modules/config/tests/src/Functional/ConfigImportUploadTest.php
similarity index 86%
rename from core/modules/config/src/Tests/ConfigImportUploadTest.php
rename to core/modules/config/tests/src/Functional/ConfigImportUploadTest.php
index 5e2129513c..955842d01b 100644
--- a/core/modules/config/src/Tests/ConfigImportUploadTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigImportUploadTest.php
@@ -1,15 +1,18 @@
 <?php
 
-namespace Drupal\config\Tests;
+namespace Drupal\Tests\config\Functional;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
+use Drupal\Tests\TestFileCreationTrait;
 
 /**
  * Tests importing configuration from an uploaded file.
  *
  * @group config
  */
-class ConfigImportUploadTest extends WebTestBase {
+class ConfigImportUploadTest extends BrowserTestBase {
+
+  use TestFileCreationTrait;
 
   /**
    * A user with the 'import configuration' permission.
@@ -41,7 +44,7 @@ public function testImport() {
     $this->assertResponse(200);
 
     // Attempt to upload a non-tar file.
-    $text_file = current($this->drupalGetTestFiles('text'));
+    $text_file = $this->getTestFiles('text')[0];
     $edit = ['files[import_tarball]' => drupal_realpath($text_file->uri)];
     $this->drupalPostForm('admin/config/development/configuration/full/import', $edit, t('Upload'));
     $this->assertText(t('Could not extract the contents of the tar file'));
diff --git a/core/modules/config/src/Tests/ConfigInstallWebTest.php b/core/modules/config/tests/src/Functional/ConfigInstallWebTest.php
similarity index 98%
rename from core/modules/config/src/Tests/ConfigInstallWebTest.php
rename to core/modules/config/tests/src/Functional/ConfigInstallWebTest.php
index 63ecb5bb68..5dc3119dfb 100644
--- a/core/modules/config/src/Tests/ConfigInstallWebTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigInstallWebTest.php
@@ -1,11 +1,11 @@
 <?php
 
-namespace Drupal\config\Tests;
+namespace Drupal\Tests\config\Functional;
 
 use Drupal\Core\Config\PreExistingConfigException;
 use Drupal\Core\Config\StorageInterface;
 use Drupal\language\Entity\ConfigurableLanguage;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests installation and removal of configuration objects in install, disable
@@ -13,7 +13,7 @@
  *
  * @group config
  */
-class ConfigInstallWebTest extends WebTestBase {
+class ConfigInstallWebTest extends BrowserTestBase {
 
   /**
    * The admin user used in this test.
@@ -51,6 +51,7 @@ public function testIntegrationModuleReinstallation() {
 
     // Install the integration module.
     \Drupal::service('module_installer')->install(['config_integration_test']);
+    $this->resetAll();
 
     // Verify that default module config exists.
     \Drupal::configFactory()->reset($default_config);
@@ -156,7 +157,7 @@ public function testPreExistingConfigInstall() {
     // override created still exists.
     $this->drupalGet('admin/appearance');
     $url = $this->xpath("//a[contains(@href,'config_clash_test_theme') and contains(@href,'/install?')]/@href")[0];
-    $this->drupalGet($this->getAbsoluteUrl($url));
+    $this->drupalGet($this->getAbsoluteUrl($url->getText()));
     $this->assertRaw('Unable to install config_clash_test_theme, <em class="placeholder">config_test.dynamic.dotted.default, language/fr/config_test.dynamic.dotted.default</em> already exist in active configuration.');
 
     // Test installing a theme through the API that has existing configuration.
diff --git a/core/modules/config/src/Tests/ConfigSingleImportExportTest.php b/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php
similarity index 94%
rename from core/modules/config/src/Tests/ConfigSingleImportExportTest.php
rename to core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php
index 607e80c23b..dc10323b2d 100644
--- a/core/modules/config/src/Tests/ConfigSingleImportExportTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php
@@ -1,16 +1,16 @@
 <?php
 
-namespace Drupal\config\Tests;
+namespace Drupal\Tests\config\Functional;
 
 use Drupal\Core\Serialization\Yaml;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests the user interface for importing/exporting a single configuration.
  *
  * @group config
  */
-class ConfigSingleImportExportTest extends WebTestBase {
+class ConfigSingleImportExportTest extends BrowserTestBase {
 
   /**
    * Modules to enable.
@@ -225,16 +225,16 @@ public function testExport() {
     $this->drupalGet('admin/config/development/configuration/single/export/system.simple');
     $this->assertFieldByXPath('//select[@name="config_type"]//option[@selected="selected"]', t('Simple configuration'), 'The simple configuration option is selected when specified in the URL.');
     // Spot check several known simple configuration files.
-    $element = $this->xpath('//select[@name="config_name"]');
-    $options = $this->getAllOptions($element[0]);
+    $element = $this->xpath('//select[@name="config_name"]')[0];
+    $options = $element->findAll('css', 'option');
     $expected_options = ['system.site', 'user.settings'];
     foreach ($options as &$option) {
-      $option = (string) $option;
+      $option = $option->getValue();
     }
     $this->assertIdentical($expected_options, array_intersect($expected_options, $options), 'The expected configuration files are listed.');
 
     $this->drupalGet('admin/config/development/configuration/single/export/system.simple/system.image');
-    $this->assertFieldByXPath('//textarea[@name="export"]', "toolkit: gd\n_core:\n  default_config_hash: durWHaKeBaq4d9Wpi4RqwADj1OufDepcnJuhVLmKN24\n", 'The expected system configuration is displayed.');
+    $this->assertEquals("toolkit: gd\n_core:\n  default_config_hash: durWHaKeBaq4d9Wpi4RqwADj1OufDepcnJuhVLmKN24\n", $this->xpath('//textarea[@name="export"]')[0]->getValue(), 'The expected system configuration is displayed.');
 
     $this->drupalGet('admin/config/development/configuration/single/export/date_format');
     $this->assertFieldByXPath('//select[@name="config_type"]//option[@selected="selected"]', t('Date format'), 'The date format entity type is selected when specified in the URL.');
@@ -243,7 +243,7 @@ public function testExport() {
     $this->assertFieldByXPath('//select[@name="config_name"]//option[@selected="selected"]', t('Fallback date format (fallback)'), 'The fallback date format config entity is selected when specified in the URL.');
 
     $fallback_date = \Drupal::entityManager()->getStorage('date_format')->load('fallback');
-    $yaml_text = (string) $this->xpath('//textarea[@name="export"]')[0];
+    $yaml_text = $this->xpath('//textarea[@name="export"]')[0]->getValue();
     $this->assertEqual(Yaml::decode($yaml_text), $fallback_date->toArray(), 'The fallback date format config entity export code is displayed.');
   }
 
diff --git a/core/modules/config/src/Tests/LanguageNegotiationFormOverrideTest.php b/core/modules/config/tests/src/Functional/LanguageNegotiationFormOverrideTest.php
similarity index 93%
rename from core/modules/config/src/Tests/LanguageNegotiationFormOverrideTest.php
rename to core/modules/config/tests/src/Functional/LanguageNegotiationFormOverrideTest.php
index ba67960650..6c4e1bb311 100644
--- a/core/modules/config/src/Tests/LanguageNegotiationFormOverrideTest.php
+++ b/core/modules/config/tests/src/Functional/LanguageNegotiationFormOverrideTest.php
@@ -1,8 +1,8 @@
 <?php
 
-namespace Drupal\config\Tests;
+namespace Drupal\Tests\config\Functional;
 
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests language-negotiation overrides are not on language-negotiation form.
@@ -10,7 +10,7 @@
  * @group config
  * @see \Drupal\Core\Form\ConfigFormBase
  */
-class LanguageNegotiationFormOverrideTest extends WebTestBase {
+class LanguageNegotiationFormOverrideTest extends BrowserTestBase {
 
   public static $modules = ['language', 'locale', 'locale_test'];
 
diff --git a/core/modules/config/tests/src/Traits/AssertConfigEntityImportTrait.php b/core/modules/config/tests/src/Traits/AssertConfigEntityImportTrait.php
new file mode 100644
index 0000000000..e83bedc651
--- /dev/null
+++ b/core/modules/config/tests/src/Traits/AssertConfigEntityImportTrait.php
@@ -0,0 +1,37 @@
+<?php
+
+namespace Drupal\Tests\config\Traits;
+
+use Drupal\Core\Config\Entity\ConfigEntityInterface;
+
+/**
+ * Provides test assertions for testing config entity synchronization.
+ *
+ * Can be used by test classes that extend \Drupal\simpletest\WebTestBase or
+ * \Drupal\KernelTests\KernelTestBase.
+ */
+trait AssertConfigEntityImportTrait {
+
+  /**
+   * Asserts that a config entity can be imported without changing it.
+   *
+   * @param \Drupal\Core\Config\Entity\ConfigEntityInterface $entity
+   *   The config entity to test importing.
+   */
+  public function assertConfigEntityImport(ConfigEntityInterface $entity) {
+    // Save original config information.
+    $entity_uuid = $entity->uuid();
+    $entity_type_id = $entity->getEntityTypeId();
+    $original_data = $entity->toArray();
+    // Copy everything to sync.
+    $this->copyConfig(\Drupal::service('config.storage'), \Drupal::service('config.storage.sync'));
+    // Delete the configuration from active. Don't worry about side effects of
+    // deleting config like fields cleaning up field storages. The coming import
+    // should recreate everything as necessary.
+    $entity->delete();
+    $this->configImporter()->reset()->import();
+    $imported_entity = \Drupal::entityManager()->loadEntityByUuid($entity_type_id, $entity_uuid);
+    $this->assertIdentical($original_data, $imported_entity->toArray());
+  }
+
+}
diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceIntegrationTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceIntegrationTest.php
index 56484705e1..ea65c4b931 100644
--- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceIntegrationTest.php
+++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceIntegrationTest.php
@@ -3,11 +3,11 @@
 namespace Drupal\Tests\field\Functional\EntityReference;
 
 use Drupal\Component\Utility\SafeMarkup;
-use Drupal\config\Tests\AssertConfigEntityImportTrait;
 use Drupal\entity_test\Entity\EntityTest;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\Tests\BrowserTestBase;
 use Drupal\field\Tests\EntityReference\EntityReferenceTestTrait;
+use Drupal\Tests\config\Traits\AssertConfigEntityImportTrait;
 
 /**
  * Tests various Entity reference UI components.
