Move "Powered by farmOS" block to farm_ui_theme.

This commit is contained in:
Michael Stenta 2020-12-07 11:57:22 -05:00
parent 1de7f4ed77
commit fe3bbcde2b
6 changed files with 31 additions and 27 deletions

View File

@ -15,7 +15,6 @@ dependencies: { }
# Install modules and theme.
install:
- block
- dblog
- farm_settings
themes:

View File

@ -2,7 +2,7 @@ langcode: en
status: true
dependencies:
module:
- farm
- farm_ui_theme
theme:
- gin
id: farm_powered

View File

@ -5,3 +5,4 @@ package: farmOS UI
core_version_requirement: ^9
dependencies:
- config_rewrite:config_rewrite
- drupal:block

View File

@ -1,6 +1,6 @@
<?php
namespace Drupal\farm\Plugin\Block;
namespace Drupal\farm_ui_theme\Plugin\Block;
use Drupal\system\Plugin\Block\SystemPoweredByBlock;

View File

@ -0,0 +1,28 @@
<?php
namespace Drupal\Tests\farm_ui_theme\Functional;
use Drupal\Tests\farm\Functional\FarmBrowserTestBase;
/**
* Tests the "Powered by farmOS" block.
*
* @group farm
*/
class FarmBlockTest extends FarmBrowserTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = [
'farm_ui_theme',
];
/**
* Test that the "Powered by farmOS" block is visible.
*/
public function testFarmBlock() {
$this->assertSession()->pageTextContains('Powered by farmOS');
}
}

View File

@ -1,24 +0,0 @@
<?php
namespace Drupal\Tests\farm\Functional;
/**
* Tests integrated functionality of the farmOS profile.
*
* @group farm
*/
class FarmTest extends FarmBrowserTestBase {
/**
* Tests integrated functionality of the farmOS profile.
*/
public function testFarm() {
// Test that the profile was installed.
$this->assertSame($this->profile, $this->container->getParameter('install_profile'));
// Test that the "Powered by farmOS" block is visible.
$this->assertText('Powered by farmOS');
}
}