protected function HelpTopicTranslatedTestBase::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/modules/help_topics/tests/src/Functional/HelpTopicTranslatedTestBase.php \Drupal\Tests\help_topics\Functional\HelpTopicTranslatedTestBase::setUp()
Overrides BrowserTestBase::setUp
2 calls to HelpTopicTranslatedTestBase::setUp()
- HelpTopicSearchTest::setUp in core/
modules/ help_topics/ tests/ src/ Functional/ HelpTopicSearchTest.php - HelpTopicTranslationTest::setUp in core/
modules/ help_topics/ tests/ src/ Functional/ HelpTopicTranslationTest.php
2 methods override HelpTopicTranslatedTestBase::setUp()
- HelpTopicSearchTest::setUp in core/
modules/ help_topics/ tests/ src/ Functional/ HelpTopicSearchTest.php - HelpTopicTranslationTest::setUp in core/
modules/ help_topics/ tests/ src/ Functional/ HelpTopicTranslationTest.php
File
- core/
modules/ help_topics/ tests/ src/ Functional/ HelpTopicTranslatedTestBase.php, line 28
Class
- HelpTopicTranslatedTestBase
- Provides a base class for functional help topic tests that use translation.
Namespace
Drupal\Tests\help_topics\FunctionalCode
protected function setUp() {
parent::setUp();
// These tests rely on some markup from the 'Seven' theme.
\Drupal::service('theme_installer')
->install([
'seven',
]);
\Drupal::configFactory()
->getEditable('system.theme')
->set('admin', 'seven')
->save(TRUE);
// Place various blocks.
$settings = [
'theme' => 'seven',
'region' => 'help',
];
$this
->placeBlock('help_block', $settings);
$this
->placeBlock('local_tasks_block', $settings);
$this
->placeBlock('local_actions_block', $settings);
$this
->placeBlock('page_title_block', $settings);
// Create user.
$this
->drupalLogin($this
->createUser([
'access administration pages',
'view the administration theme',
'administer permissions',
]));
}