You are here

public function MailhandlerTestCase::createMailbox in Mailhandler 6.2

Same name and namespace in other branches
  1. 7.2 tests/mailhandler.test \MailhandlerTestCase::createMailbox()
1 call to MailhandlerTestCase::createMailbox()
MailhandlerTestCase::createMailboxes in tests/mailhandler.test

File

tests/mailhandler.test, line 34
Tests for Mailhandler modules.

Class

MailhandlerTestCase
@file Tests for Mailhandler modules.

Code

public function createMailbox($prefix) {
  $edit = array();
  $edit['admin_title'] = $prefix . '@example.com';
  $edit['mail'] = $prefix . '_example_com';
  $edit['settings[type]'] = 'local';
  $edit['settings[folder]'] = file_directory_temp() . '/mailhandler_test/' . $prefix;
  $edit['settings[flag_after_read]'] = FALSE;
  $this
    ->drupalPost(MAILHANDLER_MENU_PREFIX . '/mailhandler/add', $edit, t('Save'));
  $this
    ->assertText(t('@title has been created.', array(
    '@title' => $prefix . '_example_com',
  )));
}