diff core/modules/config/tests/src/Functional/ConfigInstallProfileOverrideTest.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children
line wrap: on
line diff
--- a/core/modules/config/tests/src/Functional/ConfigInstallProfileOverrideTest.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/core/modules/config/tests/src/Functional/ConfigInstallProfileOverrideTest.php	Thu Feb 28 13:21:36 2019 +0000
@@ -24,7 +24,6 @@
    */
   protected $profile = 'testing_config_overrides';
 
-
   /**
    * Tests install profile config changes.
    */
@@ -108,7 +107,16 @@
     $this->container->get('module_installer')->install(['dblog']);
     $this->rebuildContainer();
     $this->assertEqual($config_test_storage->load('override_unmet')->label(), 'Override', 'The optional config_test entity is overridden by the profile optional configuration and is installed when its dependencies are met.');
-    $this->assertEqual($config_test_storage->load('completely_new')->label(), 'Completely new optional configuration', 'The optional config_test entity is provided by the profile optional configuration and is installed when its dependencies are met.');
+    $config_test_new = $config_test_storage->load('completely_new');
+    $this->assertEqual($config_test_new->label(), 'Completely new optional configuration', 'The optional config_test entity is provided by the profile optional configuration and is installed when its dependencies are met.');
+    $config_test_new->delete();
+
+    // Install another module that provides optional configuration and ensure
+    // that deleted profile configuration is not re-created.
+    $this->container->get('module_installer')->install(['config_other_module_config_test']);
+    $this->rebuildContainer();
+    $config_test_storage = \Drupal::entityManager()->getStorage('config_test');
+    $this->assertNull($config_test_storage->load('completely_new'));
   }
 
 }