public function NewsletterListTestCase::testNewsletterListEdit in Newsletter 7
Same name and namespace in other branches
- 7.2 newsletter.test \NewsletterListTestCase::testNewsletterListEdit()
File
- ./
newsletter.test, line 123 - Tests for Newsletter module.
Class
- NewsletterListTestCase
- The NewsletterListTestCase tests CUD actions through Web UI for newsletter lists.
Code
public function testNewsletterListEdit() {
$edit = array();
$edit['title'] = $this
->randomName(8);
$edit['field_list_description[' . LANGUAGE_NONE . '][0][value]'] = $this
->randomName(15);
$edit['field_newsletter_categories[' . LANGUAGE_NONE . ']'] = $this
->randomName(8);
$edit['field_newsletter_template[' . LANGUAGE_NONE . ']'] = 4;
$edit['send_rate'] = 'Custom';
$edit['send_rate_custom'] = rand(0, 10);
$this
->drupalPost('admin/config/media/newsletter/lists/edit/1', $edit, t('Update'));
$this
->assertText(t('List updated successfully'));
}