function ContactSitewideTest::updateContactForm in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/contact/src/Tests/ContactSitewideTest.php \Drupal\contact\Tests\ContactSitewideTest::updateContactForm()
Updates a form.
Parameters
string $id: The form machine name.
string $label: The form label.
string $recipients: The list of recipient email addresses.
string $reply: The auto-reply text that is sent to a user upon completing the contact form.
bool $selected: A Boolean indicating whether the form should be selected by default.
1 call to ContactSitewideTest::updateContactForm()
- ContactSitewideTest::testSiteWideContact in core/
modules/ contact/ src/ Tests/ ContactSitewideTest.php - Tests configuration options and the site-wide contact form.
File
- core/
modules/ contact/ src/ Tests/ ContactSitewideTest.php, line 392 - Contains \Drupal\contact\Tests\ContactSitewideTest.
Class
- ContactSitewideTest
- Tests site-wide contact form functionality.
Namespace
Drupal\contact\TestsCode
function updateContactForm($id, $label, $recipients, $reply, $selected) {
$edit = array();
$edit['label'] = $label;
$edit['recipients'] = $recipients;
$edit['reply'] = $reply;
$edit['selected'] = $selected ? TRUE : FALSE;
$this
->drupalPostForm("admin/structure/contact/manage/{$id}", $edit, t('Save'));
}