public function testMboxMessageSource() { $transport = new ezcMailMboxTransport(dirname(__FILE__) . "/data/testlimit-mbox"); $parser = new ezcMailParser(); $set = new ezcMailStorageSet($transport->fetchByMessageNr(1), $this->tempDir); $mail = $parser->parseMail($set); $files = $set->getSourceFiles(); $source = file_get_contents($files[0]); $this->assertEquals(2609, strlen($source)); }
public function testFetchMail4() { $mbox = new ezcMailMboxTransport(dirname(__FILE__) . "/data/test-mbox"); try { $set = $mbox->fetchByMessageNr(-1); $this->assertEquals('Expected exception was not thrown'); } catch (ezcMailNoSuchMessageException $e) { $this->assertEquals("The message with ID '-1' could not be found.", $e->getMessage()); } try { $set = $mbox->fetchByMessageNr(3); $this->assertEquals('Expected exception was not thrown'); } catch (ezcMailNoSuchMessageException $e) { $this->assertEquals("The message with ID '3' could not be found.", $e->getMessage()); } }