public function ConfigDependencyTest::testNonEntity in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php \Drupal\KernelTests\Core\Config\ConfigDependencyTest::testNonEntity()
- 10 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 29
Class
- ConfigDependencyTest
- Tests for configuration dependencies.
Namespace
Drupal\KernelTests\Core\ConfigCode
public function testNonEntity() {
$this
->installConfig([
'system',
]);
$config_manager = \Drupal::service('config.manager');
$dependents = $config_manager
->findConfigEntityDependents('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::findConfigEntityDependentsAsEntities()
// does not try to load system.site as an entity.
$config_manager
->findConfigEntityDependentsAsEntities('module', [
'system',
]);
}