/**
  * Sets the subject
  *
  * @param Message       $message      The mail message
  * @param Swift_Message $swiftMessage The Swift Mailer message
  *
  * @return void
  */
 protected function setSubject(Message $message, Swift_Message $swiftMessage)
 {
     $subject = $message->getSubject();
     if ($subject !== null) {
         $swiftMessage->setSubject($subject);
     }
 }
Example #2
0
 public function test_that_it_can_set_and_get_subject()
 {
     $subject = 'Test Subject';
     $this->message->setSubject($subject);
     $this->assertSame($subject, $this->message->getSubject());
 }