protected function SearchRankingTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 core/modules/search/tests/src/Functional/SearchRankingTest.php \Drupal\Tests\search\Functional\SearchRankingTest::setUp()
 
Overrides BrowserTestBase::setUp
File
- core/
modules/ search/ tests/ src/ Functional/ SearchRankingTest.php, line 43  
Class
- SearchRankingTest
 - Indexes content and tests ranking factors.
 
Namespace
Drupal\Tests\search\FunctionalCode
protected function setUp() : void {
  parent::setUp();
  $this
    ->drupalCreateContentType([
    'type' => 'page',
    'name' => 'Basic page',
  ]);
  // Create a plugin instance.
  $this->nodeSearch = SearchPage::load('node_search');
  // Log in with sufficient privileges.
  $this
    ->drupalLogin($this
    ->drupalCreateUser([
    'post comments',
    'skip comment approval',
    'create page content',
    'administer search',
  ]));
}