/**
* Tests that calculating dependencies for system module.
*/
public function testNonEntity() { $this->
installConfig(['system'
]);
$config_manager = \Drupal::
service('config.manager'
);
$dependents =
$config_manager->
findConfigEntityDependencies('module',
['system'
]);
$this->
assertTrue(isset($dependents['system.site'
]), 'Simple configuration system.site has a UUID key even though it is not a configuration entity and therefore is found when looking for dependencies of the System module.'
);
// Ensure that calling
// \Drupal\Core\Config\ConfigManager::findConfigEntityDependenciesAsEntities()
// does not try to load system.site as an entity.
$config_manager->
findConfigEntityDependenciesAsEntities('module',
['system'
]);
} /**
* Tests creating dependencies on configuration entities.
*/
public function testDependencyManagement() { /** @var \Drupal\Core\Config\ConfigManagerInterface $config_manager */
$config_manager = \Drupal::
service('config.manager'
);
$storage =
$this->container->
get('entity_type.manager'
)->
getStorage('config_test'
);
// Test dependencies between modules.
$entity1 =
$storage->
create( [