public function NewsletterTemplateTestCase::testNewsletterTemplateDeleteMass in Newsletter 7
Same name and namespace in other branches
- 7.2 newsletter.test \NewsletterTemplateTestCase::testNewsletterTemplateDeleteMass()
File
- ./
newsletter.test, line 69 - Tests for Newsletter module.
Class
- NewsletterTemplateTestCase
- The NewsletterTemplateTestCase tests CUD actions through Web UI for newsletter templates.
Code
public function testNewsletterTemplateDeleteMass() {
// Create some templates.
for ($i = 5; $i < 10; $i++) {
$this
->testNewsletterTemplateCreate();
$delete["template[{$i}]"] = $i;
}
$delete['operation'] = 'delete';
$this
->drupalPost('admin/config/media/newsletter/templates', $delete, t('Update'));
$this
->drupalPost(NULL, NULL, t('Confirm'));
$this
->assertText(t('Templates deleted successfully'));
}