function SearchConfigSettingsFormTest::verifySearchPageOperations
Same name in other branches
- 8.9.x core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php \Drupal\Tests\search\Functional\SearchConfigSettingsFormTest::verifySearchPageOperations()
- 10 core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php \Drupal\Tests\search\Functional\SearchConfigSettingsFormTest::verifySearchPageOperations()
- 11.x core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php \Drupal\Tests\search\Functional\SearchConfigSettingsFormTest::verifySearchPageOperations()
Checks that the search page operations match expectations.
Parameters
string $id: The search page ID to check.
bool $edit: Whether the edit link is expected.
bool $delete: Whether the delete link is expected.
bool $disable: Whether the disable link is expected.
bool $enable: Whether the enable link is expected.
1 call to SearchConfigSettingsFormTest::verifySearchPageOperations()
- SearchConfigSettingsFormTest::testMultipleSearchPages in core/
modules/ search/ tests/ src/ Functional/ SearchConfigSettingsFormTest.php - Tests multiple search pages of the same type.
File
-
core/
modules/ search/ tests/ src/ Functional/ SearchConfigSettingsFormTest.php, line 385
Class
- SearchConfigSettingsFormTest
- Verify the search config settings form.
Namespace
Drupal\Tests\search\FunctionalCode
protected function verifySearchPageOperations($id, $edit, $delete, $disable, $enable) {
if ($edit) {
$this->assertSession()
->linkByHrefExists("admin/config/search/pages/manage/{$id}");
}
else {
$this->assertSession()
->linkByHrefNotExists("admin/config/search/pages/manage/{$id}");
}
if ($delete) {
$this->assertSession()
->linkByHrefExists("admin/config/search/pages/manage/{$id}/delete");
}
else {
$this->assertSession()
->linkByHrefNotExists("admin/config/search/pages/manage/{$id}/delete");
}
if ($disable) {
$this->assertSession()
->linkByHrefExists("admin/config/search/pages/manage/{$id}/disable");
}
else {
$this->assertSession()
->linkByHrefNotExists("admin/config/search/pages/manage/{$id}/disable");
}
if ($enable) {
$this->assertSession()
->linkByHrefExists("admin/config/search/pages/manage/{$id}/enable");
}
else {
$this->assertSession()
->linkByHrefNotExists("admin/config/search/pages/manage/{$id}/enable");
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.