diff --git a/test/classes/gis/PMA_GIS_Multilinestring_test.php b/test/classes/gis/PMA_GIS_Multilinestring_test.php index a0ab50f040..e41b4b364a 100644 --- a/test/classes/gis/PMA_GIS_Multilinestring_test.php +++ b/test/classes/gis/PMA_GIS_Multilinestring_test.php @@ -198,5 +198,39 @@ class PMA_GIS_MultilinestringTest extends PMA_GIS_GeomTest ) ); } + + /** + * test scaleRow method + * + * @param string $spatial spatial data of a row + * @param array $min_max expected results + * + * @dataProvider providerForTestScaleRow + * @return nothing + */ + public function testScaleRow($spatial, $min_max) + { + $this->assertEquals($this->object->scaleRow($spatial), $min_max); + } + + /** + * data provider for testScaleRow + * + * @return data for testScaleRow + */ + public function providerForTestScaleRow() + { + return array( + array( + 'MULTILINESTRING((36 14,47 23,62 75),(36 10,17 23,178 53))', + array( + 'minX' => 17, + 'maxX' => 178, + 'minY' => 10, + 'maxY' => 75 + ) + ) + ); + } } ?> \ No newline at end of file diff --git a/test/classes/gis/PMA_GIS_Multipoint_test.php b/test/classes/gis/PMA_GIS_Multipoint_test.php index 1d5fcdfe53..f3ba91e01e 100644 --- a/test/classes/gis/PMA_GIS_Multipoint_test.php +++ b/test/classes/gis/PMA_GIS_Multipoint_test.php @@ -142,5 +142,39 @@ class PMA_GIS_MultipointTest extends PMA_GIS_GeomTest ) ); } + + /** + * test scaleRow method + * + * @param string $spatial spatial data of a row + * @param array $min_max expected results + * + * @dataProvider providerForTestScaleRow + * @return nothing + */ + public function testScaleRow($spatial, $min_max) + { + $this->assertEquals($this->object->scaleRow($spatial), $min_max); + } + + /** + * data provider for testScaleRow + * + * @return data for testScaleRow + */ + public function providerForTestScaleRow() + { + return array( + array( + 'MULTIPOINT(12 35,48 75,69 23,25 45,14 53,35 78)', + array( + 'minX' => 12, + 'maxX' => 69, + 'minY' => 23, + 'maxY' => 78 + ) + ) + ); + } } ?> \ No newline at end of file diff --git a/test/classes/gis/PMA_GIS_Point_test.php b/test/classes/gis/PMA_GIS_Point_test.php index 9f9ef21a10..7ab89bc827 100644 --- a/test/classes/gis/PMA_GIS_Point_test.php +++ b/test/classes/gis/PMA_GIS_Point_test.php @@ -144,5 +144,39 @@ class PMA_GIS_PointTest extends PMA_GIS_GeomTest ) ); } + + /** + * test scaleRow method + * + * @param string $spatial spatial data of a row + * @param array $min_max expected results + * + * @dataProvider providerForTestScaleRow + * @return nothing + */ + public function testScaleRow($spatial, $min_max) + { + $this->assertEquals($this->object->scaleRow($spatial), $min_max); + } + + /** + * data provider for testScaleRow + * + * @return data for testScaleRow + */ + public function providerForTestScaleRow() + { + return array( + array( + 'POINT(12 35)', + array( + 'minX' => 12, + 'maxX' => 12, + 'minY' => 35, + 'maxY' => 35, + ) + ) + ); + } } ?> \ No newline at end of file