diff options
author | Yasitha Pandithawatta <yasitha4@gmail.com> | 2012-06-01 23:28:48 +0400 |
---|---|---|
committer | Michal Čihař <mcihar@suse.cz> | 2012-06-04 11:59:53 +0400 |
commit | c6f70c2fe32c390794e5b30c88481214e26e8c32 (patch) | |
tree | bb7a09e21fdfe1c98c89af083607eac0b3315f2b /test | |
parent | a4472166bd936d589d23e41c94229a7d79d33d00 (diff) |
improve code coverage in PMA_GIS_Geometry_test.php
Diffstat (limited to 'test')
-rw-r--r-- | test/classes/gis/PMA_GIS_Geometry_test.php | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/test/classes/gis/PMA_GIS_Geometry_test.php b/test/classes/gis/PMA_GIS_Geometry_test.php index 080707addd..ebfb54ea8a 100644 --- a/test/classes/gis/PMA_GIS_Geometry_test.php +++ b/test/classes/gis/PMA_GIS_Geometry_test.php @@ -244,5 +244,68 @@ class PMA_GIS_GeometryTest extends PHPUnit_Framework_TestCase ), ); } + + /** + * + * @param type $srid + * @param type $scale_data + * @param type $output + * @dataProvider providerForTestGetBoundsForOl + */ + public function testGetBoundsForOl($srid, $scale_data, $output){ + + $this->assertEquals( + $this->_callProtectedFunction( + 'getBoundsForOl', + array($srid, $scale_data) + ), + $output + ); + } + + public function providerForTestGetBoundsForOl() { + return array( + array( + 4326, + array( + 'minX' => '0', + 'minY' => '0', + 'maxX' => '1', + 'maxY' => '1' + ), + 'bound = new OpenLayers.Bounds(); bound.extend(new OpenLayers.LonLat(0, 0).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject())); bound.extend(new OpenLayers.LonLat(1, 1).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()));' + ), + ); + + } + + /** + * + * @param type $polygons + * @param type $srid + * @param type $output + * + *@dataProvider providerForTestGetPolygonArrayForOpenLayers + */ + public function testGetPolygonArrayForOpenLayers($polygons, $srid, $output){ + $this->assertEquals( + $this->_callProtectedFunction( + 'getPolygonArrayForOpenLayers', + array($polygons, $srid) + ), + $output + ); + } + + public function providerForTestGetPolygonArrayForOpenLayers(){ + + return array( + + + ); + + } + + } ?> |