function HelpTopicTest::setUp
Same name in other branches
- 9 core/modules/help_topics/tests/src/Functional/HelpTopicTest.php \Drupal\Tests\help_topics\Functional\HelpTopicTest::setUp()
- 10 core/modules/help/tests/src/Functional/HelpTopicTest.php \Drupal\Tests\help\Functional\HelpTopicTest::setUp()
- 11.x core/modules/help/tests/src/Functional/HelpTopicTest.php \Drupal\Tests\help\Functional\HelpTopicTest::setUp()
Overrides BrowserTestBase::setUp
File
-
core/
modules/ help_topics/ tests/ src/ Functional/ HelpTopicTest.php, line 50
Class
- HelpTopicTest
- Verifies help topic display and user access to help based on permissions.
Namespace
Drupal\Tests\help_topics\FunctionalCode
protected function setUp() {
parent::setUp();
// These tests rely on some markup from the 'Seven' theme and we test theme
// provided help topics.
\Drupal::service('theme_installer')->install([
'seven',
'help_topics_test_theme',
]);
\Drupal::service('config.factory')->getEditable('system.theme')
->set('admin', 'seven')
->save();
// 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);
$this->placeBlock('system_breadcrumb_block', $settings);
// Create users.
$this->adminUser = $this->createUser([
'access administration pages',
'view the administration theme',
'administer permissions',
'administer site configuration',
]);
$this->anyUser = $this->createUser([]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.