function SearchNodeUpdateAndDeletionTest::setUp

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

Overrides BrowserTestBase::setUp

File

core/modules/search/tests/src/Functional/SearchNodeUpdateAndDeletionTest.php, line 38

Class

SearchNodeUpdateAndDeletionTest
Tests search index is updated properly when nodes are removed or updated.

Namespace

Drupal\Tests\search\Functional

Code

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

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