示例#1
0
 public function testFromNameGetterAndSetter()
 {
     $entity = new Email();
     $entity->setFromName('test');
     $this->assertEquals('test', $entity->getFromName());
 }
示例#2
0
 /**
  * @param Email  $email
  * @param string $sender
  */
 protected function processSender(Email $email, $sender)
 {
     if ($email->getId()) {
         if (strtolower($email->getFromName()) !== strtolower($sender)) {
             throw $this->createInvalidPropertyException('Sender', $email->getFromName(), $sender);
         }
     } else {
         $email->setFromName($sender)->setFromEmailAddress($this->emailEntityBuilder->address($sender));
     }
 }