function SearchBlockTest::setUp

Same name in other branches
  1. 9 core/modules/search/tests/src/Functional/SearchBlockTest.php \Drupal\Tests\search\Functional\SearchBlockTest::setUp()
  2. 10 core/modules/search/tests/src/Functional/SearchBlockTest.php \Drupal\Tests\search\Functional\SearchBlockTest::setUp()
  3. 11.x core/modules/search/tests/src/Functional/SearchBlockTest.php \Drupal\Tests\search\Functional\SearchBlockTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/search/tests/src/Functional/SearchBlockTest.php, line 35

Class

SearchBlockTest
Tests if the search form block is available.

Namespace

Drupal\Tests\search\Functional

Code

protected function setUp() {
    parent::setUp();
    // Create and log in user.
    $this->adminUser = $this->drupalCreateUser([
        'administer blocks',
        'search content',
        'access user profiles',
        'access content',
    ]);
    $this->drupalLogin($this->adminUser);
}

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