Example #1
0
 protected function getPointMock($dimension = null, $srid = null, Coordinates $coordinates = null)
 {
     $mock = $this->getGeometryMockForClass('GeoIO\\Geometry\\Point', $dimension, $srid);
     if ($coordinates) {
         $mock->expects($this->any())->method('getX')->will($this->returnValue($coordinates->getX()));
         $mock->expects($this->any())->method('getY')->will($this->returnValue($coordinates->getY()));
         $mock->expects($this->any())->method('getZ')->will($this->returnValue($coordinates->getZ()));
         $mock->expects($this->any())->method('getM')->will($this->returnValue($coordinates->getM()));
     }
     return $mock;
 }
Example #2
0
 public function testConstructorShouldAllowEmptyZAndMCoordinates()
 {
     $coordinates = new Coordinates(1, 2);
     $this->assertNull($coordinates->getZ());
     $this->assertNull($coordinates->getM());
 }