function ForumTest::setUp
Same name in other branches
- 9 core/modules/forum/tests/src/Functional/ForumTest.php \Drupal\Tests\forum\Functional\ForumTest::setUp()
- 8.9.x core/modules/forum/tests/src/Functional/ForumTest.php \Drupal\Tests\forum\Functional\ForumTest::setUp()
- 10 core/modules/forum/tests/src/Functional/ForumTest.php \Drupal\Tests\forum\Functional\ForumTest::setUp()
Overrides BrowserTestBase::setUp
File
-
core/
modules/ forum/ tests/ src/ Functional/ ForumTest.php, line 95
Class
- ForumTest
- Tests for forum.module.
Namespace
Drupal\Tests\forum\FunctionalCode
protected function setUp() : void {
parent::setUp();
$this->drupalPlaceBlock('system_breadcrumb_block');
$this->drupalPlaceBlock('page_title_block');
// Create users.
$this->adminUser = $this->drupalCreateUser([
'access administration pages',
'access help pages',
'administer modules',
'administer blocks',
'administer forums',
'administer menu',
'administer taxonomy',
'create forum content',
'access comments',
]);
$this->editAnyTopicsUser = $this->drupalCreateUser([
'access administration pages',
'access help pages',
'create forum content',
'edit any forum content',
'delete any forum content',
]);
$this->editOwnTopicsUser = $this->drupalCreateUser([
'create forum content',
'edit own forum content',
'delete own forum content',
]);
$this->webUser = $this->drupalCreateUser();
$this->postCommentUser = $this->drupalCreateUser([
'administer content types',
'create forum content',
'post comments',
'skip comment approval',
'access comments',
]);
$this->drupalPlaceBlock('help_block', [
'region' => 'help',
]);
$this->drupalPlaceBlock('local_actions_block');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.