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. 8.9.x 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 37

Class

SearchBlockTest
Tests if the search form block is available.

Namespace

Drupal\Tests\search\Functional

Code

protected function setUp() : void {
    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.