comparison core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents c75dbcec494b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
41 public static $skippedConfig = [ 41 public static $skippedConfig = [
42 'locale.settings' => ['path: '], 42 'locale.settings' => ['path: '],
43 'syslog.settings' => ['facility: '], 43 'syslog.settings' => ['facility: '],
44 'simpletest.settings' => TRUE, 44 'simpletest.settings' => TRUE,
45 ]; 45 ];
46
47 /**
48 * {@inheritdoc}
49 */
50 protected function setUp() {
51 parent::setUp();
52
53 // @todo ModuleInstaller calls system_rebuild_module_data which is part of
54 // system.module, see https://www.drupal.org/node/2208429.
55 include_once $this->root . '/core/modules/system/system.module';
56
57 // Set up the state values so we know where to find the files when running
58 // drupal_get_filename().
59 // @todo Remove as part of https://www.drupal.org/node/2186491
60 system_rebuild_module_data();
61 }
62 46
63 /** 47 /**
64 * Tests if installed config is equal to the exported config. 48 * Tests if installed config is equal to the exported config.
65 * 49 *
66 * @dataProvider coreModuleListDataProvider 50 * @dataProvider coreModuleListDataProvider
124 if ($active_config_storage->exists($config_name)) { 108 if ($active_config_storage->exists($config_name)) {
125 // If it is a config entity re-save it. This ensures that any 109 // If it is a config entity re-save it. This ensures that any
126 // recalculation of dependencies does not cause config change. 110 // recalculation of dependencies does not cause config change.
127 if ($entity_type = $config_manager->getEntityTypeIdByName($config_name)) { 111 if ($entity_type = $config_manager->getEntityTypeIdByName($config_name)) {
128 $entity_storage = $config_manager 112 $entity_storage = $config_manager
129 ->getEntityManager() 113 ->getEntityTypeManager()
130 ->getStorage($entity_type); 114 ->getStorage($entity_type);
131 $id = $entity_storage->getIDFromConfigName($config_name, $entity_storage->getEntityType() 115 $id = $entity_storage->getIDFromConfigName($config_name, $entity_storage->getEntityType()
132 ->getConfigPrefix()); 116 ->getConfigPrefix());
133 $entity_storage->load($id)->calculateDependencies()->save(); 117 $entity_storage->load($id)->calculateDependencies()->save();
134 } 118 }