/**
  * Formats a place for the thank-you e-mail.
  *
  * @param tx_seminars_Model_Place $place the place to format
  * @param string $newline the newline to use in formatting, must be either LF or '<br />'
  *
  * @return string the formatted place, will not be empty
  */
 private function formatPlace(tx_seminars_Model_Place $place, $newline)
 {
     $address = preg_replace('/[\\n|\\r]+/', ' ', str_replace('<br />', ' ', strip_tags($place->getAddress())));
     $countryName = $place->hasCountry() ? ', ' . $place->getCountry()->getLocalShortName() : '';
     $zipAndCity = trim($place->getZip() . ' ' . $place->getCity());
     return $place->getTitle() . $newline . $address . $newline . $zipAndCity . $countryName;
 }
示例#2
0
 /**
  * @test
  */
 public function getTitleWithNonEmptyTitleReturnsTitle()
 {
     $this->fixture->setData(array('title' => 'Nice place'));
     self::assertEquals('Nice place', $this->fixture->getTitle());
 }