function SearchConfigSettingsFormTest::testSearchModuleSettingsPage
Same name in other branches
- 8.9.x core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php \Drupal\Tests\search\Functional\SearchConfigSettingsFormTest::testSearchModuleSettingsPage()
- 10 core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php \Drupal\Tests\search\Functional\SearchConfigSettingsFormTest::testSearchModuleSettingsPage()
- 11.x core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php \Drupal\Tests\search\Functional\SearchConfigSettingsFormTest::testSearchModuleSettingsPage()
Verifies plugin-supplied settings form.
File
-
core/
modules/ search/ tests/ src/ Functional/ SearchConfigSettingsFormTest.php, line 142
Class
- SearchConfigSettingsFormTest
- Verify the search config settings form.
Namespace
Drupal\Tests\search\FunctionalCode
public function testSearchModuleSettingsPage() {
$this->drupalGet('admin/config/search/pages');
$this->clickLink('Edit', 1);
// Ensure that the default setting was picked up from the default config
$this->assertTrue($this->assertSession()
->optionExists('edit-extra-type-settings-boost', 'bi')
->isSelected());
// Change extra type setting and also modify a common search setting.
$edit = [
'extra_type_settings[boost]' => 'ii',
];
$this->submitForm($edit, 'Save search page');
// Ensure that the modifications took effect.
$this->assertSession()
->statusMessageContains("The Dummy search type search page has been updated.", 'status');
$this->drupalGet('admin/config/search/pages/manage/dummy_search_type');
$this->assertTrue($this->assertSession()
->optionExists('edit-extra-type-settings-boost', 'ii')
->isSelected());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.