예제 #1
0
 public function test_that_it_can_set_and_get_timestamp()
 {
     $timestamp = time();
     $this->message->setTimestamp($timestamp);
     $this->assertSame($timestamp, $this->message->getTimestamp());
 }
 /**
  * Sets the timestamp
  *
  * @param Message       $message      The mail message
  * @param Swift_Message $swiftMessage The Swift Mailer message
  *
  * @return void
  */
 protected function setTimestamp(Message $message, Swift_Message $swiftMessage)
 {
     $timestamp = $message->getTimestamp();
     if ($timestamp !== null) {
         $swiftMessage->setDate($timestamp);
     }
 }