diff --git a/core/modules/config/src/Tests/ConfigInstallProfileUnmetDependenciesTest.php b/core/modules/config/src/Tests/ConfigInstallProfileUnmetDependenciesTest.php
index 6683580eab..4ffbc92e74 100644
--- a/core/modules/config/src/Tests/ConfigInstallProfileUnmetDependenciesTest.php
+++ b/core/modules/config/src/Tests/ConfigInstallProfileUnmetDependenciesTest.php
@@ -7,7 +7,13 @@
 use Drupal\simpletest\InstallerTestBase;
 
 /**
- * Tests install profile config overrides can not add unmet dependencies.
+ * Tests install profile config overrides can create inter-module dependencies.
+ *
+ * Tests successful installation in the case if there are two modules A and B
+ * and they don't have any dependencies between each other and A is installed
+ * before B during the site installation, but A provides a default config,
+ * which is overridden in the profile and there a dependency to module B is
+ * added.
  *
  * @group Config
  */
@@ -45,7 +51,8 @@ protected function setUp() {
     }
 
     // Add a dependency that can not be met because User is installed before
-    // Action.
+    // Action in order to ensure the default module config will be used during
+    // the module installation instead the profile override one.
     $config_file = $dest . DIRECTORY_SEPARATOR . InstallStorage::CONFIG_INSTALL_DIRECTORY . DIRECTORY_SEPARATOR . 'system.action.user_block_user_action.yml';
     $action = Yaml::decode(file_get_contents($config_file));
     $action['dependencies']['module'][] = 'action';
@@ -76,21 +83,32 @@ protected function error($message = '', $group = 'Other', array $caller = NULL)
    * {@inheritdoc}
    */
   protected function setUpSite() {
-    // This step is not reached due to the exception.
+    if ($this->expectedException) {
+      // This step is not reached due to the exception.
+    }
+    else {
+      parent::setUpSite();
+    }
   }
 
-
   /**
    * Confirms that the installation succeeded.
    */
   public function testInstalled() {
     if ($this->expectedException) {
-      $this->pass('Expected Drupal\Core\Config\UnmetDependenciesException exception thrown');
+      $this->fail('Unexpected Drupal\Core\Config\UnmetDependenciesException exception thrown');
     }
     else {
-      $this->fail('Expected Drupal\Core\Config\UnmetDependenciesException exception thrown');
+      $this->pass('Drupal\Core\Config\UnmetDependenciesException exception not thrown');
+
+      // Ensure the overridden config in the profile has been installed.
+      /** @var \Drupal\Core\Config\ConfigManagerInterface $config_manager */
+      $config_manager = $this->container->get('config.manager');
+      $entity_label = $config_manager->loadConfigEntityByName('system.action.user_block_user_action')
+        ->label();
+      $this->assertEqual('Overridden block the selected user(s)', $entity_label);
     }
-    $this->assertErrorLogged('Configuration objects provided by <em class="placeholder">user</em> have unmet dependencies: <em class="placeholder">system.action.user_block_user_action (action)</em>');
+    $this->assertNoErrorsLogged();
   }
 
 }
