You are here

public function NewsletterListTestCase::testNewsletterListDeleteMass in Newsletter 7

Same name and namespace in other branches
  1. 7.2 newsletter.test \NewsletterListTestCase::testNewsletterListDeleteMass()

File

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

Class

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

Code

public function testNewsletterListDeleteMass() {

  // Create some lists.
  for ($i = 2; $i < 7; $i++) {
    $this
      ->testNewsletterListCreate();
    $delete["list[{$i}]"] = $i;
  }
  $delete['operation'] = 'delete';
  $this
    ->drupalPost('admin/config/media/newsletter/lists', $delete, t('Update'));
  $this
    ->drupalPost(NULL, NULL, t('Confirm'));
  $this
    ->assertText(t('Lists deleted successfully'));
}