function HelpTest::setUp
Same name in this branch
- main core/modules/help/tests/src/Functional/HelpTest.php \Drupal\Tests\help\Functional\HelpTest::setUp()
Same name and namespace in other branches
- 11.x core/modules/help/tests/src/Functional/HelpTest.php \Drupal\Tests\help\Functional\HelpTest::setUp()
- 10 core/modules/help/tests/src/Functional/HelpTest.php \Drupal\Tests\help\Functional\HelpTest::setUp()
- 9 core/modules/help/tests/src/Functional/HelpTest.php \Drupal\Tests\help\Functional\HelpTest::setUp()
- 8.9.x core/modules/help/tests/src/Functional/HelpTest.php \Drupal\Tests\help\Functional\HelpTest::setUp()
- 11.x core/modules/help/tests/src/Kernel/HelpTest.php \Drupal\Tests\help\Kernel\HelpTest::setUp()
File
-
core/
modules/ help/ tests/ src/ Kernel/ HelpTest.php, line 65
Class
- HelpTest
- Verify help display and user access to help based on permissions.
Namespace
Drupal\Tests\help\KernelCode
protected function setUp() : void {
parent::setUp();
$this->installEntitySchema('block');
$this->installEntitySchema('block_content');
$this->installEntitySchema('user');
// Create users.
$this->adminUser = $this->createUser([
'access help pages',
'view the administration theme',
'administer permissions',
]);
$this->anyUser = $this->createUser();
$this->installConfig('system');
$this->config('system.site')
->set('name', 'Drupal')
->save();
$this->container
->get('theme_installer')
->install([
'stark',
]);
$this->config('system.theme')
->set('default', 'stark')
->save();
$this->placeBlock('page_title_block');
$this->placeBlock('help_block');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.