protected function SearchConfigSettingsFormTest::verifySearchPageOperations in Drupal 8
Same name and namespace in other branches
- 9 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 371
Class
- SearchConfigSettingsFormTest
- Verify the search config settings form.
Namespace
Drupal\Tests\search\FunctionalCode
protected function verifySearchPageOperations($id, $edit, $delete, $disable, $enable) {
if ($edit) {
$this
->assertLinkByHref("admin/config/search/pages/manage/{$id}");
}
else {
$this
->assertNoLinkByHref("admin/config/search/pages/manage/{$id}");
}
if ($delete) {
$this
->assertLinkByHref("admin/config/search/pages/manage/{$id}/delete");
}
else {
$this
->assertNoLinkByHref("admin/config/search/pages/manage/{$id}/delete");
}
if ($disable) {
$this
->assertLinkByHref("admin/config/search/pages/manage/{$id}/disable");
}
else {
$this
->assertNoLinkByHref("admin/config/search/pages/manage/{$id}/disable");
}
if ($enable) {
$this
->assertLinkByHref("admin/config/search/pages/manage/{$id}/enable");
}
else {
$this
->assertNoLinkByHref("admin/config/search/pages/manage/{$id}/enable");
}
}