예제 #1
0
 function testSetReadStatus()
 {
     $data = $this->mail_data;
     $mail = MailManager::createMail($data);
     $dir = MailManager::loadDirectoryFromName(MAILBOX, $this->author_id);
     $oldreadstatus = MailManager::getReadStatus($mail, $dir);
     MailManager::setReadStatus($mail, $dir, true);
     $dir2 = MailManager::loadDirectory($dir->getID());
     $newstatus = MailManager::getReadStatus($mail, $dir2);
     //echo "<p>" . serialize($oldreadstatus) . "<br />" . serialize($newstatus) . "</p>"; //DEBUG
     if ($dir2 === false) {
         return "<br />Status test NOT PASSED: not updated";
     }
     if ($newstatus == $oldreadstatus) {
         return "<br />Status test NOT PASSED: not updated status";
     }
     return "<br />Status test passed";
 }