protected function SearchSetLocaleTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/modules/search/tests/src/Functional/SearchSetLocaleTest.php \Drupal\Tests\search\Functional\SearchSetLocaleTest::setUp()
- 9 core/modules/search/tests/src/Functional/SearchSetLocaleTest.php \Drupal\Tests\search\Functional\SearchSetLocaleTest::setUp()
File
- core/
modules/ search/ tests/ src/ Functional/ SearchSetLocaleTest.php, line 31
Class
- SearchSetLocaleTest
- Tests that search works with numeric locale settings.
Namespace
Drupal\Tests\search\FunctionalCode
protected function setUp() : void {
parent::setUp();
$this
->drupalCreateContentType([
'type' => 'page',
'name' => 'Basic page',
]);
// Create a plugin instance.
$this->nodeSearchPlugin = $this->container
->get('plugin.manager.search')
->createInstance('node_search');
// Create a node with a very simple body.
$this
->drupalCreateNode([
'body' => [
[
'value' => 'tapir',
],
],
]);
// Update the search index.
$this->nodeSearchPlugin
->updateIndex();
}