/**
  * Try geocoding Helsinki, check city and country
  */
 public function test_helsinki()
 {
     $geocoder = new midgardmvc_helper_location_geocoder_geonames();
     $data = array('city' => 'Helsinki', 'country' => 'FI');
     $spot = $geocoder->geocode($data);
     // Check that we got the correct type
     $this->assertTrue(is_a($spot, 'midgardmvc_helper_location_spot'));
     // Check that the type is near Helsinki
     $this->assertEquals((int) round($spot->latitude), 60);
     $this->assertEquals((int) round($spot->longitude), 25);
     // Check that we got city and country
     $this->assertEquals($spot->country, 'FI');
     $this->assertEquals($spot->city, 'Helsinki');
     // Check that we got a textual location
     //$this->assertEquals($spot->text, 'Helsinki, Finland');
     // Check that accuracy is correctly set to "city"
     $this->assertEquals($spot->accuracy, 30);
     // Check that source is correct
     $this->assertEquals($spot->source, 'geonames');
 }