/** * test delete from trash */ public function testDeleteFromTrashWithFilter() { $message = $this->_sendMessage(); $this->_foldersToClear = array('INBOX', $this->_account->sent_folder, $this->_account->trash_folder); $trash = $this->_getFolder($this->_account->trash_folder); $result = $this->_json->moveMessages(array(array('field' => 'id', 'operator' => 'in', 'value' => array($message['id']))), $trash->getId()); $messageInTrash = $this->_searchForMessageBySubject($message['subject'], $this->_account->trash_folder); // delete messages in trash with filter $this->_json->addFlags(array(array('field' => 'folder_id', 'operator' => 'equals', 'value' => $trash->getId()), array('field' => 'id', 'operator' => 'in', 'value' => array($messageInTrash['id']))), Zend_Mail_Storage::FLAG_DELETED); $this->setExpectedException('Tinebase_Exception_NotFound'); $this->_json->getMessage($messageInTrash['id']); }