/** * {@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; }
public function testGetName() { $sender = new Sender('*****@*****.**', 'Foo'); $this->assertSame('Foo', $sender->getName()); }