public function toValue(Location $location, $type) { if ('photon' == $type) { $data = ["geometry" => ["coordinates" => $location->getCoordinates()->getCoordinates(), "type" => $location->getCoordinates()->getType()], "type" => "Feature", "properties" => ["country" => $location->getCountry(), "city" => $location->getCity(), "state" => $location->getRegion(), "postcode" => $location->getPostalcode()]]; return $location->getCity() . '|' . Json::encode($data); } else { return $location->getCity() . ', ' . $location->getRegion(); } }
/** * @testdox Allows setting and getting the email address */ public function testSettingAndGettingTheRegion() { $region = 'Hessen'; $this->target->setRegion($region); $this->assertEquals($region, $this->target->getRegion()); }