diff --git a/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php b/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php
index 9bbfd93f648cb9535f89476f12748e7b88f693d0..7ec6db6952dcf93fff157a1b4279a4f5c2eb0e3e 100644
--- a/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php
+++ b/core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php
@@ -126,11 +126,11 @@ protected function assertExtensionConfig(string $name, string $type): void {
     $this->container->get('module_installer')->install($modules_to_install);
     $this->container->get('theme_installer')->install(array_unique($themes_to_install));
 
-    // Test configuration in the module's config/install directory.
-    $this->doTestsOnConfigStorage($extension_config_storage, $name);
+    // Test configuration in the extension's config/install directory.
+    $this->doTestsOnConfigStorage($extension_config_storage, $name, $type);
 
-    // Test configuration in the module's config/optional directory.
-    $this->doTestsOnConfigStorage($optional_config_storage, $name);
+    // Test configuration in the extension's config/optional directory.
+    $this->doTestsOnConfigStorage($optional_config_storage, $name, $type);
   }
 
   /**
@@ -184,10 +184,12 @@ public function moduleListDataProvider() {
    *
    * @param \Drupal\Core\Config\StorageInterface $default_config_storage
    *   The default config storage to test.
-   * @param string $module
-   *   The module that is being tested.
+   * @param string $extension
+   *   The extension that is being tested.
+   * @param string $type
+   *   The extension type to test.
    */
-  protected function doTestsOnConfigStorage(StorageInterface $default_config_storage, $module) {
+  protected function doTestsOnConfigStorage(StorageInterface $default_config_storage, $extension, string $type = 'module') {
     /** @var \Drupal\Core\Config\ConfigManagerInterface $config_manager */
     $config_manager = $this->container->get('config.manager');
 
@@ -229,9 +231,9 @@ protected function doTestsOnConfigStorage(StorageInterface $default_config_stora
           // and needs its own test.
           continue;
         }
-        $info = $this->container->get('extension.list.module')->getExtensionInfo($module);
+        $info = $this->container->get("extension.list.$type")->getExtensionInfo($extension);
         if (!isset($info[ExtensionLifecycle::LIFECYCLE_IDENTIFIER]) || $info[ExtensionLifecycle::LIFECYCLE_IDENTIFIER] !== ExtensionLifecycle::EXPERIMENTAL) {
-          $this->fail("$config_name provided by $module does not exist after installing all dependencies");
+          $this->fail("$config_name provided by $extension does not exist after installing all dependencies");
         }
       }
     }
diff --git a/core/modules/help_topics/config/optional/block.block.seven_help_search.yml b/core/themes/seven/config/optional/block.block.seven_help_search.yml
similarity index 93%
rename from core/modules/help_topics/config/optional/block.block.seven_help_search.yml
rename to core/themes/seven/config/optional/block.block.seven_help_search.yml
index 6d93b8f8b85d74489361b8b3f1ed577a6b88897f..912264d1fb81e8d6532f0b3baceb30b904cdb1fc 100644
--- a/core/modules/help_topics/config/optional/block.block.seven_help_search.yml
+++ b/core/themes/seven/config/optional/block.block.seven_help_search.yml
@@ -9,6 +9,8 @@ dependencies:
   enforced:
     config:
       - search.page.help_search
+    module:
+      - help_topics
 id: seven_help_search
 theme: seven
 region: help