function ConfigDependencyTest::testNonEntity
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php \Drupal\KernelTests\Core\Config\ConfigDependencyTest::testNonEntity()
- 8.9.x core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php \Drupal\KernelTests\Core\Config\ConfigDependencyTest::testNonEntity()
- 11.x core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php \Drupal\KernelTests\Core\Config\ConfigDependencyTest::testNonEntity()
Tests that calculating dependencies for system module.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Config/ ConfigDependencyTest.php, line 31
Class
- ConfigDependencyTest
- Tests for configuration dependencies.
Namespace
Drupal\KernelTests\Core\ConfigCode
public function testNonEntity() : void {
$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',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.