Пример #1
0
 /**
  * try to get a message from imap server (with complete body, attachments, etc)
  *
  */
 public function testGetMessage()
 {
     $message = $this->_sendMessage();
     // get complete message
     $message = $this->_json->getMessage($message['id']);
     // check
     $this->assertGreaterThan(0, preg_match('/aaaaaä/', $message['body']));
     // delete message on imap server and check if correct exception is thrown when trying to get it
     $this->_imap->removeMessage($message['messageuid']);
     Tinebase_Core::getCache()->clean();
     $this->setExpectedException('Felamimail_Exception_IMAPMessageNotFound');
     $message = $this->_json->getMessage($message['id']);
 }
 /**
  * try to get a message from imap server (with complete body, attachments, etc)
  * 
  * @see 0006300: add unique message-id header to new messages (for message-id check)
  */
 public function testGetMessage()
 {
     $message = $this->_sendMessage();
     // get complete message
     $message = $this->_json->getMessage($message['id']);
     // check
     $this->assertTrue(isset($message['headers']) && $message['headers']['message-id']);
     $this->assertContains('@' . $this->_mailDomain, $message['headers']['message-id']);
     $this->assertGreaterThan(0, preg_match('/teste/', $message['body']));
     // delete message on imap server and check if correct exception is thrown when trying to get it
     $this->_imap->removeMessage($message['messageuid']);
     //   Tinebase_Core::getCache()->clean();
     $this->setExpectedException('Tinebase_Exception_NotFound');
     $message = $this->_json->getMessage($message['id']);
 }