You are here

public function MailhandlerTestCase::createMailboxes in Mailhandler 7.2

Same name and namespace in other branches
  1. 6.2 tests/mailhandler.test \MailhandlerTestCase::createMailboxes()

Create mailboxes for every mbox in directory.

1 call to MailhandlerTestCase::createMailboxes()
MailhandlerTestCase::testMailhandlerImport in tests/mailhandler.test
Test case.

File

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

Class

MailhandlerTestCase
Mailhandler test cases.

Code

public function createMailboxes() {
  $dir = file_directory_temp() . '/mailhandler_test';
  $files = scandir($dir);
  $files = array_diff($files, array(
    '..',
    '.',
  ));
  foreach ($files as $mailbox) {
    $this
      ->createMailbox($mailbox);
  }
}