/** * @test */ public function getDescriptionForEventDateWithDescriptionReturnsDescription() { $topic = tx_oelib_MapperRegistry::get('tx_seminars_Mapper_Event')->getLoadedTestingModel(array('description' => 'this is a great event.')); $this->fixture->setData(array('object_type' => tx_seminars_Model_Event::TYPE_DATE, 'topic' => $topic)); self::assertEquals('this is a great event.', $this->fixture->getDescription()); }
/** * @test */ public function setDescriptionForSingleEventSetsDescription() { $this->fixture->setData(array('object_type' => tx_seminars_Model_Event::TYPE_COMPLETE)); $this->fixture->setDescription('this is a great event.'); self::assertEquals('this is a great event.', $this->fixture->getDescription()); }
/** * Builds the content for the publishing e-mail to the reviewer. * * @param tx_seminars_Model_Event $event * the event to send the publication e-mail for * * @return string the e-mail body for the publishing e-mail, will not be * empty */ private function createEMailContent(tx_seminars_Model_Event $event) { $this->getTemplateCode(TRUE); $this->setLabels(); $markerPrefix = 'publish_event'; if ($event->hasBeginDate()) { $beginDate = strftime($this->getConfValueString('dateFormatYMD'), $event->getBeginDateAsUnixTimeStamp()); } else { $beginDate = ''; } $this->setMarker('title', $event->getTitle(), $markerPrefix); $this->setOrDeleteMarkerIfNotEmpty('date', $beginDate, $markerPrefix, 'wrapper_publish_event'); $this->setMarker('description', $event->getDescription(), $markerPrefix); $this->setMarker('link', $this->createReviewUrl(), $markerPrefix); return $this->getSubpart('MAIL_PUBLISH_EVENT'); }