From fe3bbcde2b012c5e05dbeadebf87a901d905fa06 Mon Sep 17 00:00:00 2001 From: Michael Stenta Date: Mon, 7 Dec 2020 11:57:22 -0500 Subject: [PATCH] Move "Powered by farmOS" block to farm_ui_theme. --- farm.info.yml | 1 - .../install/block.block.farm_powered.yml | 2 +- modules/ui/theme/farm_ui_theme.info.yml | 1 + .../src}/Plugin/Block/FarmPoweredByBlock.php | 2 +- .../tests/src/Functional/FarmBlockTest.php | 28 +++++++++++++++++++ tests/src/Functional/FarmTest.php | 24 ---------------- 6 files changed, 31 insertions(+), 27 deletions(-) rename {config => modules/ui/theme/config}/install/block.block.farm_powered.yml (93%) rename {src => modules/ui/theme/src}/Plugin/Block/FarmPoweredByBlock.php (91%) create mode 100644 modules/ui/theme/tests/src/Functional/FarmBlockTest.php delete mode 100644 tests/src/Functional/FarmTest.php diff --git a/farm.info.yml b/farm.info.yml index ee3dff49f..7b9346ac5 100644 --- a/farm.info.yml +++ b/farm.info.yml @@ -15,7 +15,6 @@ dependencies: { } # Install modules and theme. install: - - block - dblog - farm_settings themes: diff --git a/config/install/block.block.farm_powered.yml b/modules/ui/theme/config/install/block.block.farm_powered.yml similarity index 93% rename from config/install/block.block.farm_powered.yml rename to modules/ui/theme/config/install/block.block.farm_powered.yml index bf9546ccf..21466422b 100644 --- a/config/install/block.block.farm_powered.yml +++ b/modules/ui/theme/config/install/block.block.farm_powered.yml @@ -2,7 +2,7 @@ langcode: en status: true dependencies: module: - - farm + - farm_ui_theme theme: - gin id: farm_powered diff --git a/modules/ui/theme/farm_ui_theme.info.yml b/modules/ui/theme/farm_ui_theme.info.yml index 7f899ddaf..870798bd9 100644 --- a/modules/ui/theme/farm_ui_theme.info.yml +++ b/modules/ui/theme/farm_ui_theme.info.yml @@ -5,3 +5,4 @@ package: farmOS UI core_version_requirement: ^9 dependencies: - config_rewrite:config_rewrite + - drupal:block diff --git a/src/Plugin/Block/FarmPoweredByBlock.php b/modules/ui/theme/src/Plugin/Block/FarmPoweredByBlock.php similarity index 91% rename from src/Plugin/Block/FarmPoweredByBlock.php rename to modules/ui/theme/src/Plugin/Block/FarmPoweredByBlock.php index a2bd46c45..0e3ed99c1 100644 --- a/src/Plugin/Block/FarmPoweredByBlock.php +++ b/modules/ui/theme/src/Plugin/Block/FarmPoweredByBlock.php @@ -1,6 +1,6 @@ assertSession()->pageTextContains('Powered by farmOS'); + } + +} diff --git a/tests/src/Functional/FarmTest.php b/tests/src/Functional/FarmTest.php deleted file mode 100644 index c7fba203c..000000000 --- a/tests/src/Functional/FarmTest.php +++ /dev/null @@ -1,24 +0,0 @@ -assertSame($this->profile, $this->container->getParameter('install_profile')); - - // Test that the "Powered by farmOS" block is visible. - $this->assertText('Powered by farmOS'); - } - -}