You are here

protected function SearchNodeUpdateAndDeletionTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 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 33

Class

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

Namespace

Drupal\Tests\search\Functional

Code

protected function setUp() {
  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);
}