comparison 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
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
21 * The profile to install as a basis for testing. 21 * The profile to install as a basis for testing.
22 * 22 *
23 * @var string 23 * @var string
24 */ 24 */
25 protected $profile = 'testing_config_overrides'; 25 protected $profile = 'testing_config_overrides';
26
27 26
28 /** 27 /**
29 * Tests install profile config changes. 28 * Tests install profile config changes.
30 */ 29 */
31 public function testInstallProfileConfigOverwrite() { 30 public function testInstallProfileConfigOverwrite() {
106 105
107 // Installing dblog creates the optional configuration. 106 // Installing dblog creates the optional configuration.
108 $this->container->get('module_installer')->install(['dblog']); 107 $this->container->get('module_installer')->install(['dblog']);
109 $this->rebuildContainer(); 108 $this->rebuildContainer();
110 $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.'); 109 $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.');
111 $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.'); 110 $config_test_new = $config_test_storage->load('completely_new');
111 $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.');
112 $config_test_new->delete();
113
114 // Install another module that provides optional configuration and ensure
115 // that deleted profile configuration is not re-created.
116 $this->container->get('module_installer')->install(['config_other_module_config_test']);
117 $this->rebuildContainer();
118 $config_test_storage = \Drupal::entityManager()->getStorage('config_test');
119 $this->assertNull($config_test_storage->load('completely_new'));
112 } 120 }
113 121
114 } 122 }