Exemplo n.º 1
0
 public function testMessageFlagsAreSet()
 {
     $origFlags = array('foo' => 'bar', 'baz' => 'bat');
     $message = new Message(array('flags' => $origFlags));
     $messageFlags = $message->getFlags();
     $this->assertTrue($message->hasFlag('bar'), var_export($messageFlags, 1));
     $this->assertTrue($message->hasFlag('bat'), var_export($messageFlags, 1));
     $this->assertEquals(array('bar' => 'bar', 'bat' => 'bat'), $messageFlags);
 }
Exemplo n.º 2
0
 /**
  * Marks the mail with the processed flag
  *
  * @param ImapAdapter $imap
  * @param Message     $message
  * @param integer     $id
  */
 protected function markProcessed(ImapAdapter $imap, Message $message, $id)
 {
     $flags = $message->getFlags();
     $flags[] = self::PROCESSED_FLAG;
     $imap->setFlags($id, $flags);
 }