示例#1
0
 /**
  * Returns the HTML for a list of emails in a given folder
  * @param GUID $ieId GUID to InboundEmail instance
  * @param string $mbox Mailbox path name in dot notation
  * @param int $folderListCacheOffset Seconds for valid cache file
  * @return string HTML render of list.
  */
 function getListEmails($ieId, $mbox, $folderListCacheOffset, $forceRefresh = 'false')
 {
     global $sugar_config;
     $ie = new InboundEmail();
     $ie->retrieve($ieId);
     $list = $ie->displayFolderContents($mbox, $forceRefresh);
     return $list;
 }
 public function testdisplayFolderContents()
 {
     $inboundEmail = new InboundEmail();
     $expected = array('mbox' => 'INBOX', 'ieId' => 1, 'name' => 'test', 'fromCache' => 0, 'out' => array());
     $inboundEmail->id = 1;
     $inboundEmail->name = 'test';
     $result = $inboundEmail->displayFolderContents('INBOX', 'false', 1);
     $this->assertEquals($expected, $result);
 }