function SearchConfigSettingsFormTest::setDefaultThroughUi
Same name in other branches
- 9 core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php \Drupal\Tests\search\Functional\SearchConfigSettingsFormTest::setDefaultThroughUi()
- 10 core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php \Drupal\Tests\search\Functional\SearchConfigSettingsFormTest::setDefaultThroughUi()
- 11.x 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.
1 call to SearchConfigSettingsFormTest::setDefaultThroughUi()
- SearchConfigSettingsFormTest::testSearchModuleDisabling in core/
modules/ search/ tests/ src/ Functional/ SearchConfigSettingsFormTest.php - Verifies that you can disable individual search plugins.
File
-
core/
modules/ search/ tests/ src/ Functional/ SearchConfigSettingsFormTest.php, line 420
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]));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.