/** * 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; }
/** * @test */ public function setZipSetsZip() { $this->fixture->setZip('13373'); self::assertEquals('13373', $this->fixture->getZip()); }