/**
  * @covers GeomPolygon::__toString
  * @todo Implement test__toString().
  */
 public function test__toString()
 {
     $polygon = new \GeomPolygon("POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))");
     $this->assertEquals("POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))", $polygon->__toString());
 }
示例#2
0
 /**
  * @covers ResultSet::getPolygon
  */
 public function testGetPolygon()
 {
     $polyKey = 'polygon';
     $geoPolygon = 'POLYGON((1 1,5 1,5 5,1 5,1 1))';
     $this->result->setString($polyKey, $geoPolygon);
     $actual = $this->result->getPolygon($polyKey)->toWKT();
     $excepted = new \GeomPolygon($geoPolygon);
     $this->assertSame($actual, $excepted->toWKT());
 }
 /**
  * @param $map
  * @param $key
  * @param GeomPolygon $geomPolygon
  */
 public function setPolygon(&$map, $key, $geomPolygon)
 {
     $map[$key] = $geomPolygon ? $geomPolygon->toWKT() : null;
 }