Example #1
0
 /**
  * @dataProvider getAttachmentFixture
  */
 public function testGetAttachments()
 {
     $this->mailbox->addMessage($this->getFixture('attachment_encoded_filename'));
     $message = $this->mailbox->getMessage(1);
     $this->assertCount(1, $message->getAttachments());
     $attachment = $message->getAttachments()[0];
     $this->assertEquals('Prostřeno_2014_poslední volné termíny.xls', $attachment->getFilename());
 }
Example #2
0
 protected function createTestMessage(Mailbox $mailbox, $subject = 'Don\'t panic!', $contents = 'Don\'t forget your towel', $from = '*****@*****.**', $to = '*****@*****.**')
 {
     $message = "From: {$from}\r\n" . "To: {$to}\r\n" . "Subject: {$subject}\r\n" . "\r\n" . "{$contents}";
     $mailbox->addMessage($message);
 }