Пример #1
0
 /**
  * @param Message $message
  *
  * @return bool
  */
 protected function isSeen(Message $message)
 {
     return $message->hasFlag(Storage::FLAG_SEEN);
 }
Пример #2
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);
 }