function SearchSetLocaleTest::setUp
Same name in other branches
- 7.x modules/search/search.test \SearchSetLocaleTest::setUp()
- 8.9.x core/modules/search/tests/src/Functional/SearchSetLocaleTest.php \Drupal\Tests\search\Functional\SearchSetLocaleTest::setUp()
- 10 core/modules/search/tests/src/Kernel/SearchSetLocaleTest.php \Drupal\Tests\search\Kernel\SearchSetLocaleTest::setUp()
- 11.x core/modules/search/tests/src/Kernel/SearchSetLocaleTest.php \Drupal\Tests\search\Kernel\SearchSetLocaleTest::setUp()
Overrides BrowserTestBase::setUp
File
-
core/
modules/ search/ tests/ src/ Functional/ SearchSetLocaleTest.php, line 34
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();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.