/** * process the XML file and add, change, delete or fetches data * * @todo can we get rid of LIBXML_NOWARNING * @todo we need to stored the initial data for folders and lifetime as the phone is sending them only when they change * @return resource */ public function handle() { parent::handle(); $this->_collectionId = $_GET['CollectionId']; $this->_itemId = $_GET['ItemId']; if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) { Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . " collectionId: " . $this->_collectionId . " itemId: " . $this->_itemId); } }
/** * test (plain text) mail sending via ActiveSync_Command_SendMail */ public function testSendMail() { $email = file_get_contents(dirname(__FILE__) . '/../../Felamimail/files/text_plain.eml'); $email = str_replace('gentoo-dev@lists.gentoo.org, webmaster@changchung.org', $this->_emailTestClass->getEmailAddress(), $email); $stream = fopen('data://text/plain;base64,' . base64_encode($email), 'r'); $sendMail = new Syncope_Command_SendMail($stream); $sendMail->handle(); $sendMail->getResponse(); // check if mail is in INBOX of test account $inbox = $this->_emailTestClass->getFolder('INBOX'); $testHeaderValue = 'text/plain'; $message = $this->_emailTestClass->searchAndCacheMessage($testHeaderValue, $inbox); $this->_createdMessages->addRecord($message); $this->assertEquals("Re: [gentoo-dev] `paludis --info' is not like `emerge --info'", $message->subject); // check duplicate headers $completeMessage = Felamimail_Controller_Message::getInstance()->getCompleteMessage($message); $this->assertEquals(1, count($completeMessage->headers['mime-version'])); $this->assertEquals(1, count($completeMessage->headers['content-type'])); }