public function testInsertGenericPlace()
 {
     // Set all possible fields
     $places['id'] = 123;
     $places['place_type'] = "Park";
     $places['name'] = "A Park";
     $places['full_name'] = "The Greatest Park";
     $places['country_code'] = "UK";
     $places['country'] = "United Kingdom";
     $places['icon'] = "http://www.iconlocation.com";
     $places['lat_lng'] = 'POINT(51.514 -0.1167)';
     $places['bounding_box'] = 'POLYGON((-0.213503 51.512805,-0.105303 51.512805,-0.105303 51.572068,' . '-0.213503 51.572068, -0.213503 51.512805)))';
     $places['map_image'] = "http://www.mapimage.com";
     // Insert the place
     $this->dao->insertGenericPlace($places, 1234, 'foursquare');
     // Get the place from the database
     $res = $this->dao->getPlaceByID('123');
     // Check all 12 fields were returned
     $this->assertEqual(sizeof($res), 12);
     // Check the place ID was set correctly
     $this->assertEqual($res['place_id'], '123');
     // Check the type was set correctly
     $this->assertEqual($res['place_type'], 'Park');
     // Check the name was set correctly
     $this->assertEqual($res['name'], 'A Park');
     // Check the fullname was set correctly
     $this->assertEqual($res['full_name'], 'The Greatest Park');
     // Check the country code was set correctly
     $this->assertEqual($res['country_code'], 'UK');
     // Check the country was set correctly
     $this->assertEqual($res['country'], 'United Kingdom');
     // Check the icon was set correctly
     $this->assertEqual($res['icon'], 'http://www.iconlocation.com');
     // Check the point was set correctly
     $this->assertPattern('/POINT\\(51.514/', $res['longlat']);
     $this->assertPattern('/ -0.1167/', $res['longlat']);
     // Check the bounding box was set correctly
     $this->assertEqual($res['bounding_box'], 'POLYGON((-0.213503 51.512805,-0.105303 51.512805,-0.105303 51.572068,' . '-0.213503 51.572068,-0.213503 51.512805))');
     // Check the map image was set correctly
     $this->assertEqual($res['map_image'], 'http://www.mapimage.com');
 }