function MailhandlerTestCase::assertMailboxFields in Mailhandler 6
Verify the mailbox settings are shown in the edit form.
Parameters
$mailbox: array with mailbox settings to verify in the edit form.
1 call to MailhandlerTestCase::assertMailboxFields()
- MailhandlerTestCase::testMailhandlerListAddEditDelete in ./
mailhandler.test - Verify the functionality of the administrative interface.
File
- ./
mailhandler.test, line 157 - Simpletest case for mailhandler module.
Class
- MailhandlerTestCase
- Functionality tests for mailhandler module.
Code
function assertMailboxFields($mailbox) {
// Do not use a foreach with $mailbox to make sure all fields have their
// value. Any missing value will fail here.
$this
->assertFieldByName('mail', $mailbox['mail']);
$this
->assertFieldByName('mailto', $mailbox['mailto']);
$this
->assertFieldByName('folder', $mailbox['folder']);
$this
->assertFieldByName('imap', $mailbox['imap']);
$this
->assertFieldByName('imap', $mailbox['imap']);
$this
->assertFieldByName('domain', $mailbox['domain']);
$this
->assertFieldByName('port', $mailbox['port']);
$this
->assertFieldByName('name', $mailbox['name']);
$this
->assertFieldByName('pass', $mailbox['pass']);
$this
->assertFieldByName('extraimap', $mailbox['extraimap']);
$this
->assertFieldByName('mime', $mailbox['mime']);
$this
->assertFieldByName('security', $mailbox['security']);
$this
->assertFieldByName('replies', $mailbox['replies']);
$this
->assertFieldByName('fromheader', $mailbox['fromheader']);
$this
->assertFieldByName('commands', $mailbox['commands']);
$this
->assertFieldByName('sigseparator', $mailbox['sigseparator']);
$this
->assertFieldByName('delete_after_read', $mailbox['delete_after_read']);
$this
->assertFieldByName('enabled', $mailbox['enabled']);
$this
->assertFieldByName('format', $mailbox['format']);
$this
->assertFieldByName('authentication', $mailbox['authentication']);
}