예제 #1
0
파일: Message.php 프로젝트: helthe/mandrill
 /**
  * {@inheritdoc}
  */
 public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array())
 {
     $data = array('headers' => $this->headers, 'html' => $this->html, 'text' => $this->text, 'subject' => $this->subject, 'from_email' => $this->sender->getEmail(), 'from_name' => $this->sender->getName(), 'to' => array());
     foreach ($this->recipients as $recipient) {
         $data['to'][] = $recipient->normalize($normalizer, $format, $context);
     }
     return $data;
 }
예제 #2
0
 public function testGetName()
 {
     $sender = new Sender('*****@*****.**', 'Foo');
     $this->assertSame('Foo', $sender->getName());
 }