You are here

public function NewsletterListTestCase::testNewsletterListCreate in Newsletter 7.2

Same name and namespace in other branches
  1. 7 newsletter.test \NewsletterListTestCase::testNewsletterListCreate()
1 call to NewsletterListTestCase::testNewsletterListCreate()
NewsletterListTestCase::testNewsletterListDeleteMass in ./newsletter.test

File

./newsletter.test, line 111
Tests for Newsletter module.

Class

NewsletterListTestCase
The NewsletterListTestCase tests CUD actions through Web UI for newsletter lists.

Code

public function testNewsletterListCreate() {
  $create = array();
  $create['title'] = $this
    ->randomName(8);
  $create['field_list_description[' . LANGUAGE_NONE . '][0][value]'] = $this
    ->randomName(15);
  $create['field_newsletter_categories[' . LANGUAGE_NONE . ']'] = $this
    ->randomName(8);
  $create['field_newsletter_template[' . LANGUAGE_NONE . ']'] = 4;
  $create['send_rate'] = 'Daily';
  $this
    ->drupalPost('admin/config/media/newsletter/lists/add', $create, t('Save'));
  $this
    ->assertText(t('List updated successfully'));
}