protected function HelpTopicTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/modules/help_topics/tests/src/Functional/HelpTopicTest.php \Drupal\Tests\help_topics\Functional\HelpTopicTest::setUp()
- 9 core/modules/help_topics/tests/src/Functional/HelpTopicTest.php \Drupal\Tests\help_topics\Functional\HelpTopicTest::setUp()
File
- core/
modules/ help_topics/ tests/ src/ Functional/ HelpTopicTest.php, line 57
Class
- HelpTopicTest
- Verifies help topic display and user access to help based on permissions.
Namespace
Drupal\Tests\help_topics\FunctionalCode
protected function setUp() : void {
parent::setUp();
// These tests rely on some markup from the 'stark' theme and we test theme
// provided help topics.
\Drupal::service('theme_installer')
->install([
'help_topics_test_theme',
]);
// Place various blocks.
$settings = [
'theme' => 'stark',
'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);
$this
->placeBlock('system_breadcrumb_block', $settings);
// Create users.
$this->adminUser = $this
->createUser([
'access administration pages',
'view the administration theme',
'administer permissions',
'administer site configuration',
'access test help',
]);
$this->noTestUser = $this
->createUser([
'access administration pages',
'view the administration theme',
'administer permissions',
'administer site configuration',
]);
$this->anyUser = $this
->createUser([]);
}