[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_2-16729-g47f79cf
Madhura Jayaratne
madhuracj at users.sourceforge.net
Mon Aug 22 17:25:11 CEST 2011
The branch, master has been updated
via 47f79cf0912733a7b713cd549a89cd22d7efce0c (commit)
via a7e48cde1016ca6dfebc5c89a867420e11ee17b8 (commit)
from 9cda17487c6068fdd839bc99d8223dd07a028cbb (commit)
- Log -----------------------------------------------------------------
commit 47f79cf0912733a7b713cd549a89cd22d7efce0c
Author: Madhura Jayaratne <madhura.cj at gmail.com>
Date: Mon Aug 22 20:44:09 2011 +0530
Fix indentation
commit a7e48cde1016ca6dfebc5c89a867420e11ee17b8
Author: Madhura Jayaratne <madhura.cj at gmail.com>
Date: Mon Aug 22 20:43:50 2011 +0530
More test data
-----------------------------------------------------------------------
Summary of changes:
test/classes/gis/PMA_GIS_Factory_test.php | 10 +++---
test/classes/gis/PMA_GIS_Multilinestring_test.php | 22 +++++++++++++-
test/classes/gis/PMA_GIS_Multipolygon_test.php | 33 +++++++++++++++++++++
test/classes/gis/PMA_GIS_Polygon_test.php | 22 +++++++++++++-
4 files changed, 80 insertions(+), 7 deletions(-)
diff --git a/test/classes/gis/PMA_GIS_Factory_test.php b/test/classes/gis/PMA_GIS_Factory_test.php
index 6d778ab..ea4e3be 100644
--- a/test/classes/gis/PMA_GIS_Factory_test.php
+++ b/test/classes/gis/PMA_GIS_Factory_test.php
@@ -59,19 +59,19 @@ class PMA_GIS_FactoryTest extends PHPUnit_Framework_TestCase
'PMA_GIS_Multilinestring'
),
array(
- 'LINESTRING',
+ 'LINESTRING',
'PMA_GIS_Linestring'
),
array(
- 'MULTIPOINT',
+ 'MULTIPOINT',
'PMA_GIS_Multipoint'
),
array(
- 'POINT',
+ 'POINT',
'PMA_GIS_Point'
),
- array(
- 'GEOMETRYCOLLECTION',
+ array(
+ 'GEOMETRYCOLLECTION',
'PMA_GIS_Geometrycollection'
),
);
diff --git a/test/classes/gis/PMA_GIS_Multilinestring_test.php b/test/classes/gis/PMA_GIS_Multilinestring_test.php
index cef0cef..b385deb 100644
--- a/test/classes/gis/PMA_GIS_Multilinestring_test.php
+++ b/test/classes/gis/PMA_GIS_Multilinestring_test.php
@@ -72,6 +72,12 @@ class PMA_GIS_MultilinestringTest extends PMA_GIS_GeometryTest
$temp1 = $temp;
unset($temp1[0]['MULTILINESTRING'][1][1]['y']);
+ $temp2 = $temp;
+ $temp2[0]['MULTILINESTRING']['no_of_lines'] = 0;
+
+ $temp3 = $temp;
+ $temp3[0]['MULTILINESTRING'][1]['no_of_points'] = 1;
+
return array(
array(
$temp,
@@ -99,7 +105,21 @@ class PMA_GIS_MultilinestringTest extends PMA_GIS_GeometryTest
0,
'0',
'MULTILINESTRING((5.02 8.45,6.14 0.15),(1.23 4.25,9.15 0))'
- )
+ ),
+ // atleast one line should be there
+ array(
+ $temp1,
+ 0,
+ null,
+ 'MULTILINESTRING((5.02 8.45,6.14 0.15)))'
+ ),
+ // a line should have atleast two points
+ array(
+ $temp1,
+ 0,
+ '0',
+ 'MULTILINESTRING((5.02 8.45,6.14 0.15),(1.23 4.25,9.15 0.47))'
+ ),
);
}
diff --git a/test/classes/gis/PMA_GIS_Multipolygon_test.php b/test/classes/gis/PMA_GIS_Multipolygon_test.php
index 1a43555..3281b4f 100644
--- a/test/classes/gis/PMA_GIS_Multipolygon_test.php
+++ b/test/classes/gis/PMA_GIS_Multipolygon_test.php
@@ -92,6 +92,15 @@ class PMA_GIS_MultipolygonTest extends PMA_GIS_GeometryTest
0 => $this->_getData()
);
+ $temp1 = $temp;
+ $temp1[0]['MULTIPOLYGON']['no_of_polygons'] = 0;
+
+ $temp2 = $temp;
+ $temp2[0]['MULTIPOLYGON'][1]['no_of_lines'] = 0;
+
+ $temp3 = $temp;
+ $temp3[0]['MULTIPOLYGON'][1][0]['no_of_points'] = 3;
+
return array(
array(
$temp,
@@ -100,6 +109,30 @@ class PMA_GIS_MultipolygonTest extends PMA_GIS_GeometryTest
'MULTIPOLYGON(((35 10,10 20,15 40,45 45,35 10)'
. ',(20 30,35 32,30 20,20 30)),((123 0,23 30,17 63,123 0)))'
),
+ // at lease one polygon should be there
+ array(
+ $temp1,
+ 0,
+ null,
+ 'MULTIPOLYGON(((35 10,10 20,15 40,45 45,35 10)'
+ . ',(20 30,35 32,30 20,20 30)))'
+ ),
+ // a polygon should have atleast one ring
+ array(
+ $temp2,
+ 0,
+ null,
+ 'MULTIPOLYGON(((35 10,10 20,15 40,45 45,35 10)'
+ . ',(20 30,35 32,30 20,20 30)),((123 0,23 30,17 63,123 0)))'
+ ),
+ // a ring should have atleast four points
+ array(
+ $temp3,
+ 0,
+ '0',
+ 'MULTIPOLYGON(((35 10,10 20,15 40,45 45,35 10)'
+ . ',(20 30,35 32,30 20,20 30)),((123 0,23 30,17 63,123 0)))'
+ ),
);
}
diff --git a/test/classes/gis/PMA_GIS_Polygon_test.php b/test/classes/gis/PMA_GIS_Polygon_test.php
index b504acc..9a27e34 100644
--- a/test/classes/gis/PMA_GIS_Polygon_test.php
+++ b/test/classes/gis/PMA_GIS_Polygon_test.php
@@ -82,6 +82,12 @@ class PMA_GIS_PolygonTest extends PMA_GIS_GeometryTest
$temp1 = $temp;
unset($temp1[0]['POLYGON'][1][3]['y']);
+ $temp2 = $temp;
+ $temp2[0]['POLYGON']['no_of_lines'] = 0;
+
+ $temp3 = $temp;
+ $temp3[0]['POLYGON'][1]['no_of_points'] = 3;
+
return array(
array(
$temp,
@@ -109,7 +115,21 @@ class PMA_GIS_PolygonTest extends PMA_GIS_GeometryTest
0,
'0',
'POLYGON((35 10,10 20,15 40,45 45,35 10),(20 30,35 32,30 20,20 0))'
- )
+ ),
+ // should have atleast one ring
+ array(
+ $temp2,
+ 0,
+ '0',
+ 'POLYGON((35 10,10 20,15 40,45 45,35 10))'
+ ),
+ // a ring should have atleast four points
+ array(
+ $temp3,
+ 0,
+ '0',
+ 'POLYGON((35 10,10 20,15 40,45 45,35 10),(20 30,35 32,30 20,20 30))'
+ ),
);
}
hooks/post-receive
--
phpMyAdmin
More information about the Git
mailing list