diff --git a/core/modules/block_content/tests/modules/block_content_test/config/install/block.block.testblock.yml b/core/modules/block_content/tests/modules/block_content_test/config/install/block.block.testblock.yml new file mode 100644 index 0000000..07cd061 --- /dev/null +++ b/core/modules/block_content/tests/modules/block_content_test/config/install/block.block.testblock.yml @@ -0,0 +1,24 @@ +langcode: en +status: true +dependencies: + content: + - 'block_content:basic:7297c945-457f-4b2c-8700-dc3052ab63ba' + module: + - block_content + theme: + - bartik +id: testblock +theme: bartik +region: content +weight: -8 +provider: null +plugin: 'block_content:7297c945-457f-4b2c-8700-dc3052ab63ba' +settings: + id: 'block_content:7297c945-457f-4b2c-8700-dc3052ab63ba' + label: 'Test Block' + provider: block_content + label_display: visible + status: true + info: '' + view_mode: full +visibility: { } diff --git a/core/modules/block_content/tests/src/Kernel/BlockContentDependencyTest.php b/core/modules/block_content/tests/src/Kernel/BlockContentDependencyTest.php new file mode 100644 index 0000000..aadf70b --- /dev/null +++ b/core/modules/block_content/tests/src/Kernel/BlockContentDependencyTest.php @@ -0,0 +1,51 @@ +installConfig(['block_content_test']); + } + + /** + * Test that dependencies are not removed upon import. + */ + public function testBlockContentDependency() { + $config_name = 'block.block.testblock'; + $default_install_path = drupal_get_path('module', 'block_content_test') . '/' . InstallStorage::CONFIG_INSTALL_DIRECTORY; + $module_config_storage = new FileStorage($default_install_path, StorageInterface::DEFAULT_COLLECTION); + + $result = $this->container->get('config.manager') + ->diff($module_config_storage, $this->container->get('config.storage'), $config_name); + $this->assertConfigDiff($result, $config_name, []); + } + +}