function SearchNodePunctuationTest::setUp

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

Overrides BrowserTestBase::setUp

File

core/modules/search/tests/src/Functional/SearchNodePunctuationTest.php, line 36

Class

SearchNodePunctuationTest
Tests search functionality with punctuation and HTML entities.

Namespace

Drupal\Tests\search\Functional

Code

protected function setUp() : void {
    parent::setUp();
    $this->drupalCreateContentType([
        'type' => 'page',
        'name' => 'Basic page',
    ]);
    node_access_rebuild();
    // Create a test user and log in.
    $this->testUser = $this->drupalCreateUser([
        'access content',
        'search content',
        'use advanced search',
        'access user profiles',
    ]);
    $this->drupalLogin($this->testUser);
}

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