diff --git a/core/profiles/testing_themes_blocks/config/install/system.theme.yml b/core/profiles/testing_themes_blocks/config/install/system.theme.yml new file mode 100644 index 0000000000..0d1badf630 --- /dev/null +++ b/core/profiles/testing_themes_blocks/config/install/system.theme.yml @@ -0,0 +1,2 @@ +admin: testing_theme_optional_blocks +default: testing_theme_required_blocks diff --git a/core/profiles/testing_themes_blocks/testing_themes_blocks.info.yml b/core/profiles/testing_themes_blocks/testing_themes_blocks.info.yml new file mode 100644 index 0000000000..4eae89d61a --- /dev/null +++ b/core/profiles/testing_themes_blocks/testing_themes_blocks.info.yml @@ -0,0 +1,10 @@ +name: Testing themes blocks +type: profile +description: 'Minimal profile for testing block installation of themes.' +version: VERSION +hidden: true +themes: + - testing_theme_optional_blocks + - testing_theme_required_blocks +install: + - block diff --git a/core/profiles/testing_themes_blocks/themes/testing_theme_optional_blocks/config/optional/block.block.testing_theme_optional_blocks_page_title.yml b/core/profiles/testing_themes_blocks/themes/testing_theme_optional_blocks/config/optional/block.block.testing_theme_optional_blocks_page_title.yml new file mode 100644 index 0000000000..9377cb4721 --- /dev/null +++ b/core/profiles/testing_themes_blocks/themes/testing_theme_optional_blocks/config/optional/block.block.testing_theme_optional_blocks_page_title.yml @@ -0,0 +1,17 @@ +langcode: en +status: true +dependencies: + theme: + - testing_theme_optional_blocks +id: testing_theme_optional_blocks_page_title +theme: testing_theme_optional_blocks +region: header +weight: -30 +provider: null +plugin: page_title_block +settings: + id: page_title_block + label: 'Page title' + provider: core + label_display: '0' +visibility: { } diff --git a/core/profiles/testing_themes_blocks/themes/testing_theme_optional_blocks/testing_theme_optional_blocks.info.yml b/core/profiles/testing_themes_blocks/themes/testing_theme_optional_blocks/testing_theme_optional_blocks.info.yml new file mode 100644 index 0000000000..1a37158f51 --- /dev/null +++ b/core/profiles/testing_themes_blocks/themes/testing_theme_optional_blocks/testing_theme_optional_blocks.info.yml @@ -0,0 +1,16 @@ +name: Testing theme with optional blocks +type: theme +base theme: false +package: Testing +version: VERSION +regions: + header: 'Header' + pre_content: 'Pre-content' + breadcrumb: Breadcrumb + highlighted: Highlighted + help: Help + content: Content + page_top: 'Page top' + page_bottom: 'Page bottom' + sidebar_first: 'First sidebar' + diff --git a/core/profiles/testing_themes_blocks/themes/testing_theme_required_blocks/config/install/block.block.testing_theme_required_blocks_account_menu.yml b/core/profiles/testing_themes_blocks/themes/testing_theme_required_blocks/config/install/block.block.testing_theme_required_blocks_account_menu.yml new file mode 100644 index 0000000000..83aca4cb98 --- /dev/null +++ b/core/profiles/testing_themes_blocks/themes/testing_theme_required_blocks/config/install/block.block.testing_theme_required_blocks_account_menu.yml @@ -0,0 +1,20 @@ +langcode: en +status: true +dependencies: + theme: + - testing_theme_required_blocks +id: testing_theme_required_blocks_account_menu +theme: testing_theme_required_blocks +region: secondary_menu +weight: -4 +provider: null +plugin: system_menu_block:account +settings: + id: system_menu_block:account + label: 'User account menu' + provider: system + label_display: '0' + level: 1 + depth: 1 + expand_all_items: false +visibility: { } diff --git a/core/profiles/testing_themes_blocks/themes/testing_theme_required_blocks/testing_theme_required_blocks.info.yml b/core/profiles/testing_themes_blocks/themes/testing_theme_required_blocks/testing_theme_required_blocks.info.yml new file mode 100644 index 0000000000..7392a69ab3 --- /dev/null +++ b/core/profiles/testing_themes_blocks/themes/testing_theme_required_blocks/testing_theme_required_blocks.info.yml @@ -0,0 +1,16 @@ +name: Testing theme with required blocks +type: theme +base theme: false +package: Testing +version: VERSION +regions: + header: 'Header' + pre_content: 'Pre-content' + breadcrumb: Breadcrumb + highlighted: Highlighted + help: Help + content: Content + page_top: 'Page top' + page_bottom: 'Page bottom' + sidebar_first: 'First sidebar' + diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerThemesBlocksProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerThemesBlocksProfileTest.php new file mode 100644 index 0000000000..f415cadf01 --- /dev/null +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerThemesBlocksProfileTest.php @@ -0,0 +1,36 @@ +assertEmpty(Block::load('testing_theme_optional_blocks_account_menu')); + $this->assertNotEmpty(Block::load('testing_theme_optional_blocks_page_title')); + } + +}