function ForumIndexTest::setUp

Same name in other branches
  1. 9 core/modules/forum/tests/src/Functional/ForumIndexTest.php \Drupal\Tests\forum\Functional\ForumIndexTest::setUp()
  2. 10 core/modules/forum/tests/src/Kernel/ForumIndexTest.php \Drupal\Tests\forum\Kernel\ForumIndexTest::setUp()
  3. 10 core/modules/forum/tests/src/Functional/ForumIndexTest.php \Drupal\Tests\forum\Functional\ForumIndexTest::setUp()
  4. 11.x core/modules/forum/tests/src/Kernel/ForumIndexTest.php \Drupal\Tests\forum\Kernel\ForumIndexTest::setUp()
  5. 11.x core/modules/forum/tests/src/Functional/ForumIndexTest.php \Drupal\Tests\forum\Functional\ForumIndexTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/forum/tests/src/Functional/ForumIndexTest.php, line 26

Class

ForumIndexTest
Tests the forum index listing.

Namespace

Drupal\Tests\forum\Functional

Code

protected function setUp() {
    parent::setUp();
    // Create a test user.
    $web_user = $this->drupalCreateUser([
        'create forum content',
        'edit own forum content',
        'edit any forum content',
        'administer nodes',
        'administer forums',
    ]);
    $this->drupalLogin($web_user);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.