Esempio n. 1
0
 /**
  * @test
  */
 public function getDescriptionForOrganizerWithDescriptionReturnsDescription()
 {
     $this->fixture->setData(array('description' => 'foo'));
     self::assertEquals('foo', $this->fixture->getDescription());
 }
 /**
  * Creates the message body for the e-mail.
  *
  * @param tx_seminars_Model_FrontEndUser $user the recipient of the e-mail
  * @param tx_seminars_Model_Organizer $organizer
  *        the organizer which is selected as sender
  *
  * @return string the message with the salutation replaced by the user's
  *                name, will be empty if no message has been set in the POST
  *                data
  */
 private function createMessageBody(tx_seminars_Model_FrontEndUser $user, tx_seminars_Model_Organizer $organizer)
 {
     /** @var tx_seminars_EmailSalutation $salutation */
     $salutation = t3lib_div::makeInstance('tx_seminars_EmailSalutation');
     $messageText = str_replace('%' . $GLOBALS['LANG']->getLL('mailForm_salutation'), $salutation->getSalutation($user), $this->getPostData('messageBody'));
     $messageFooter = $organizer->hasEmailFooter() ? LF . '-- ' . LF . $organizer->getEmailFooter() : '';
     return $messageText . $messageFooter;
 }