protected function SearchAdvancedSearchFormTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/modules/search/tests/src/Functional/SearchAdvancedSearchFormTest.php \Drupal\Tests\search\Functional\SearchAdvancedSearchFormTest::setUp()
- 9 core/modules/search/tests/src/Functional/SearchAdvancedSearchFormTest.php \Drupal\Tests\search\Functional\SearchAdvancedSearchFormTest::setUp()
File
- core/
modules/ search/ tests/ src/ Functional/ SearchAdvancedSearchFormTest.php, line 31
Class
- SearchAdvancedSearchFormTest
- Indexes content and tests the advanced search form.
Namespace
Drupal\Tests\search\FunctionalCode
protected function setUp() : void {
parent::setUp();
$this
->drupalCreateContentType([
'type' => 'page',
'name' => 'Basic page',
]);
$this
->drupalCreateContentType([
'type' => 'article',
'name' => 'Article',
]);
// Create and log in user.
$test_user = $this
->drupalCreateUser([
'access content',
'search content',
'use advanced search',
'administer nodes',
]);
$this
->drupalLogin($test_user);
// Create initial node.
$this->node = $this
->drupalCreateNode();
// First update the index. This does the initial processing.
$this->container
->get('plugin.manager.search')
->createInstance('node_search')
->updateIndex();
}