/**
* @group unit
*/
public function testConstructPolygon()
{
$polygon = array(array(102.0, 2.0), array(103.0, 2.0), array(103.0, 3.0), array(103.0, 3.0), array(102.0, 2.0));
$gsp = new GeoShapeProvided('location', $polygon, GeoShapeProvided::TYPE_POLYGON);
$expected = array('geo_shape' => array('location' => array('shape' => array('type' => GeoShapeProvided::TYPE_POLYGON, 'coordinates' => $polygon, 'relation' => $gsp->getRelation()))));
$this->assertEquals($expected, $gsp->toArray());
}