Example #1
0
 /**
  * magic method for unserialize()
  *
  * with this method you can cache the mbox class
  */
 public function __wakeup()
 {
     // if cache is stall selectFolder() rebuilds the tree on error
     parent::__wakeup();
 }
Example #2
0
 public function testFailedRemove()
 {
     $mail = new Zend_Mail_Mbox(array('filename' => $this->_mboxFile));
     try {
         $mail->removeMessage(1);
     } catch (Exception $e) {
         return;
         // test ok
     }
     $this->fail('no exception raised while deleting message (mbox is read-only)');
 }
 public function testFallback()
 {
     $list = new Zend_Mail_Mbox(array('filename' => $this->_mboxFile));
     try {
         $result = $list->noop();
         $this->assertTrue($result);
     } catch (Exception $e) {
         $this->fail('exception raised while calling noop thru fallback');
     }
 }