function ContactSitewideTest::addContactForm in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/contact/src/Tests/ContactSitewideTest.php \Drupal\contact\Tests\ContactSitewideTest::addContactForm()
Adds 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.
array $third_party_settings: Array of third party settings to be added to the posted form data.
3 calls to ContactSitewideTest::addContactForm()
- ContactSitewideTest::testAutoReply in core/
modules/ contact/ src/ Tests/ ContactSitewideTest.php - Tests auto-reply on the site-wide contact form.
- ContactSitewideTest::testSiteWideContact in core/
modules/ contact/ src/ Tests/ ContactSitewideTest.php - Tests configuration options and the site-wide contact form.
- ContactStorageTest::testContactStorage in core/
modules/ contact/ src/ Tests/ ContactStorageTest.php - Tests configuration options and the site-wide contact form.
File
- core/
modules/ contact/ src/ Tests/ ContactSitewideTest.php, line 366 - Contains \Drupal\contact\Tests\ContactSitewideTest.
Class
- ContactSitewideTest
- Tests site-wide contact form functionality.
Namespace
Drupal\contact\TestsCode
function addContactForm($id, $label, $recipients, $reply, $selected, $third_party_settings = []) {
$edit = array();
$edit['label'] = $label;
$edit['id'] = $id;
$edit['recipients'] = $recipients;
$edit['reply'] = $reply;
$edit['selected'] = $selected ? TRUE : FALSE;
$edit += $third_party_settings;
$this
->drupalPostForm('admin/structure/contact/add', $edit, t('Save'));
}