Exemple #1
0
 function it_should_return_its_attachments()
 {
     $this->mailCatcher->message('id')->willReturn(['attachments' => [1, 2]]);
     $this->mailCatcher->messageAttachment('id', 1)->willReturn('attachment 1');
     $this->mailCatcher->messageAttachment('id', 2)->willReturn('attachment 2');
     $this->attachments()->shouldReturn(['attachment 1', 'attachment 2']);
 }
Exemple #2
0
 public function attachments()
 {
     $attachments = [];
     foreach ($this->retrieveMessage()['attachments'] as $cid) {
         $attachments[] = $this->mailCatcher->messageAttachment($this->id, $cid);
     }
     return $attachments;
 }
 function it_should_remove_messages()
 {
     $this->adapter->removeMessages()->shouldBeCalled();
     $result = $this->removeMessages();
 }