protected function SearchConfigSettingsFormTest::setDefaultThroughUi in Drupal 10
Same name and namespace in other branches
- 8 core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php \Drupal\Tests\search\Functional\SearchConfigSettingsFormTest::setDefaultThroughUi()
- 9 core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php \Drupal\Tests\search\Functional\SearchConfigSettingsFormTest::setDefaultThroughUi()
Sets a search page as the default in the UI.
Parameters
string $entity_id: The search page entity ID to enable.
File
- core/
modules/ search/ tests/ src/ Functional/ SearchConfigSettingsFormTest.php, line 431
Class
- SearchConfigSettingsFormTest
- Verify the search config settings form.
Namespace
Drupal\Tests\search\FunctionalCode
protected function setDefaultThroughUi($entity_id) {
$this
->drupalGet('admin/config/search/pages');
preg_match('|href="([^"]+' . $entity_id . '/set-default[^"]+)"|', $this
->getSession()
->getPage()
->getContent(), $matches);
$this
->drupalGet($this
->getAbsoluteUrl($matches[1]));
}