[mapguide-commits] r8982 - in branches/3.1/MgDev: . UnitTest/TestData/FeatureService UnitTest/TestData/ResourceService UnitTest/WebTier/Php

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Jul 12 06:00:19 PDT 2016


Author: jng
Date: 2016-07-12 06:00:19 -0700 (Tue, 12 Jul 2016)
New Revision: 8982

Modified:
   branches/3.1/MgDev/
   branches/3.1/MgDev/UnitTest/TestData/FeatureService/FeatureServiceTest.dump
   branches/3.1/MgDev/UnitTest/TestData/ResourceService/ResourceServiceTest.dump
   branches/3.1/MgDev/UnitTest/WebTier/Php/ResourceServiceHttpRequests.php
Log:
Merged revision(s) 8980-8981 from trunk/MgDev:
Fix mapagent requests in PHP test runner. "@" prefix for file uploads are long unsupported and we should be using CURLFile instead.
........
Update web tier test data expected results
 - Incorrect FDO provider version (TODO: we should really update the result normalization code to strip FDO version numbers from relevant results before comparison!)
 - Incorrect exception type
........



Property changes on: branches/3.1/MgDev
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/2.4/MgDev:6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/branches/2.6/MgDev:8276-8286,8288-8292,8297,8299,8301,8303,8314-8315,8318,8335,8340,8354-8355,8365,8373
/branches/3.0/MgDev:8658,8705,8710
/sandbox/VC140:8684-8759
/sandbox/adsk/2.6l:8727
/sandbox/adsk/3.0m:8563,8584,8607,8625,8694-8695
/sandbox/adsk/3.1n:8871,8895,8901,8912-8913,8921-8922,8942
/sandbox/jng/convenience_apis:8262-8268,8271-8363
/sandbox/jng/createruntimemap:7486-7555
/sandbox/jng/dwftk:8321-8324,8328-8329,8331,8352
/sandbox/jng/geos34x:8256-8259
/sandbox/jng/rfc155:8872-8884
/sandbox/jng/tiling:8174-8208
/sandbox/jng/v30:8212-8227
/sandbox/rfc94:5099-5163
/trunk/MgDev:8955-8956,8969
   + /branches/2.4/MgDev:6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/branches/2.6/MgDev:8276-8286,8288-8292,8297,8299,8301,8303,8314-8315,8318,8335,8340,8354-8355,8365,8373
/branches/3.0/MgDev:8658,8705,8710
/sandbox/VC140:8684-8759
/sandbox/adsk/2.6l:8727
/sandbox/adsk/3.0m:8563,8584,8607,8625,8694-8695
/sandbox/adsk/3.1n:8871,8895,8901,8912-8913,8921-8922,8942
/sandbox/jng/convenience_apis:8262-8268,8271-8363
/sandbox/jng/createruntimemap:7486-7555
/sandbox/jng/dwftk:8321-8324,8328-8329,8331,8352
/sandbox/jng/geos34x:8256-8259
/sandbox/jng/rfc155:8872-8884
/sandbox/jng/tiling:8174-8208
/sandbox/jng/v30:8212-8227
/sandbox/rfc94:5099-5163
/trunk/MgDev:8955-8956,8969,8980-8981

Modified: branches/3.1/MgDev/UnitTest/TestData/FeatureService/FeatureServiceTest.dump
===================================================================
--- branches/3.1/MgDev/UnitTest/TestData/FeatureService/FeatureServiceTest.dump	2016-07-12 12:57:24 UTC (rev 8981)
+++ branches/3.1/MgDev/UnitTest/TestData/FeatureService/FeatureServiceTest.dump	2016-07-12 13:00:19 UTC (rev 8982)
@@ -521,7 +521,7 @@
 ');
 INSERT INTO "HttpTestResults" VALUES('GetSpatialContexts on a SDF resource', 8010, 'text/xml; charset=utf-8', '
   <FdoSpatialContextList>
-    <ProviderName>OSGeo.SDF.3.9</ProviderName>
+    <ProviderName>OSGeo.SDF.4.1</ProviderName>
     <SpatialContext>
       <CoordinateSystemName>GEOGCS["LL84",DATUM["WGS 84",SPHEROID["WGS 84",6378137,0],TOWGS84[0,0,0,0,0,0,0]],PRIMEM["Greenwich",0],UNIT["Degrees",0.01745329252]]</CoordinateSystemName>
       <CoordinateSystemWkt>GEOGCS["LL84",DATUM["WGS 84",SPHEROID["WGS 84",6378137,0],TOWGS84[0,0,0,0,0,0,0]],PRIMEM["Greenwich",0],UNIT["Degrees",0.01745329252]]</CoordinateSystemWkt>
@@ -544,7 +544,7 @@
   </FdoSpatialContextList>');
 INSERT INTO "HttpTestResults" VALUES('GetSpatialContexts on a SDF resource', 8011, 'text/xml; charset=utf-8', '
   <FdoSpatialContextList>
-    <ProviderName>OSGeo.SDF.3.9</ProviderName>
+    <ProviderName>OSGeo.SDF.4.1</ProviderName>
     <SpatialContext>
       <CoordinateSystemName>GEOGCS["LL84",DATUM["WGS 84",SPHEROID["WGS 84",6378137,0],TOWGS84[0,0,0,0,0,0,0]],PRIMEM["Greenwich",0],UNIT["Degrees",0.01745329252]]</CoordinateSystemName>
       <CoordinateSystemWkt>GEOGCS["LL84",DATUM["WGS 84",SPHEROID["WGS 84",6378137,0],TOWGS84[0,0,0,0,0,0,0]],PRIMEM["Greenwich",0],UNIT["Degrees",0.01745329252]]</CoordinateSystemWkt>
@@ -1851,7 +1851,7 @@
 INSERT INTO "ApiTestResults" VALUES('GetSpatialContexts on a SDF resource when resource data is not set yet', 8009, 'text/plain', 'mgapplicationexception');
 INSERT INTO "ApiTestResults" VALUES('GetSpatialContexts on a SDF resource', 8010, 'text/xml', '
   <FdoSpatialContextList>
-    <ProviderName>OSGeo.SDF.3.9</ProviderName>
+    <ProviderName>OSGeo.SDF.4.1</ProviderName>
     <SpatialContext>
       <CoordinateSystemName>GEOGCS["LL84",DATUM["WGS 84",SPHEROID["WGS 84",6378137,0],TOWGS84[0,0,0,0,0,0,0]],PRIMEM["Greenwich",0],UNIT["Degrees",0.01745329252]]</CoordinateSystemName>
       <CoordinateSystemWkt>GEOGCS["LL84",DATUM["WGS 84",SPHEROID["WGS 84",6378137,0],TOWGS84[0,0,0,0,0,0,0]],PRIMEM["Greenwich",0],UNIT["Degrees",0.01745329252]]</CoordinateSystemWkt>
@@ -1874,7 +1874,7 @@
   </FdoSpatialContextList>');
 INSERT INTO "ApiTestResults" VALUES('GetSpatialContexts on a SDF resource', 8011, 'text/xml', '
   <FdoSpatialContextList>
-    <ProviderName>OSGeo.SDF.3.9</ProviderName>
+    <ProviderName>OSGeo.SDF.4.1</ProviderName>
     <SpatialContext>
       <CoordinateSystemName>GEOGCS["LL84",DATUM["WGS 84",SPHEROID["WGS 84",6378137,0],TOWGS84[0,0,0,0,0,0,0]],PRIMEM["Greenwich",0],UNIT["Degrees",0.01745329252]]</CoordinateSystemName>
       <CoordinateSystemWkt>GEOGCS["LL84",DATUM["WGS 84",SPHEROID["WGS 84",6378137,0],TOWGS84[0,0,0,0,0,0,0]],PRIMEM["Greenwich",0],UNIT["Degrees",0.01745329252]]</CoordinateSystemWkt>

Modified: branches/3.1/MgDev/UnitTest/TestData/ResourceService/ResourceServiceTest.dump
===================================================================
--- branches/3.1/MgDev/UnitTest/TestData/ResourceService/ResourceServiceTest.dump	2016-07-12 12:57:24 UTC (rev 8981)
+++ branches/3.1/MgDev/UnitTest/TestData/ResourceService/ResourceServiceTest.dump	2016-07-12 13:00:19 UTC (rev 8982)
@@ -936,7 +936,7 @@
 INSERT INTO "ApiTestResults" VALUES('RenameResourceData when the old data name and new data name are the same. Expects InvalidArgument exception',15007,'text/plain',X'6D67696E76616C6964617267756D656E74657863657074696F6E');
 INSERT INTO "ApiTestResults" VALUES('RenameResourceData using folder resource. Expects InvalidResourceType exception',15008,'text/plain',X'6D67696E76616C69647265736F7572636574797065657863657074696F6E');
 INSERT INTO "ApiTestResults" VALUES('RenameResourceData using valid parameters',15009,'','');
-INSERT INTO "ApiTestResults" VALUES('SetRresource with empty content file',2005,'text/plain','mginvalidargumentexception');
+INSERT INTO "ApiTestResults" VALUES('SetResource with empty content file',2005,'text/plain','mginvalidargumentexception');
 INSERT INTO "ApiTestResults" VALUES('SetResource when the resource is folder and the content file is not empty',2006,'text/plain',X'6D67696E76616C6964617267756D656E74657863657074696F6E');
 INSERT INTO "ApiTestResults" VALUES('SetResource when the resouce is folder',2007,'','');
 INSERT INTO "ApiTestResults" VALUES('SetResource when the resource is a duplicate folder.(Should work)',2008,'text/plain','An existing resource was detected: Library://Test/ResourceTest/');
@@ -1235,7 +1235,7 @@
 INSERT INTO "HttpTestResults" VALUES('RenameResourceData when the old data name and new data name are the same. Expects InvalidArgument exception',15007,'text/plain',X'4D67496E76616C6964417267756D656E74457863657074696F6E0D0A');
 INSERT INTO "HttpTestResults" VALUES('RenameResourceData using folder resource. Expects InvalidResourceType exception',15008,'text/plain',X'4D67496E76616C69645265736F7572636554797065457863657074696F6E0D0A');
 INSERT INTO "HttpTestResults" VALUES('RenameResourceData using valid parameters',15009,'text/plain; charset=utf-8',X'');
-INSERT INTO "HttpTestResults" VALUES('AddRresource with empty content file',2005,'text/plain','MgInvalidArgumentException
+INSERT INTO "HttpTestResults" VALUES('AddResource with empty content file',2005,'text/plain','MgNullArgumentException
 ');
 INSERT INTO "HttpTestResults" VALUES('AddResource when the resource is folder and the content file is not empty',2006,'text/plain',X'4D67496E76616C6964417267756D656E74457863657074696F6E0D0A');
 INSERT INTO "HttpTestResults" VALUES('AddResource when the resouce is folder',2007,'text/plain; charset=utf-8',X'');

Modified: branches/3.1/MgDev/UnitTest/WebTier/Php/ResourceServiceHttpRequests.php
===================================================================
--- branches/3.1/MgDev/UnitTest/WebTier/Php/ResourceServiceHttpRequests.php	2016-07-12 12:57:24 UTC (rev 8981)
+++ branches/3.1/MgDev/UnitTest/WebTier/Php/ResourceServiceHttpRequests.php	2016-07-12 13:00:19 UTC (rev 8982)
@@ -87,14 +87,14 @@
             if ($this->unitTestParamVm->GetString("ParamValue") != "")
             {
                 $arrayParam['CONTENT']=$this->unitTestParamVm->GetString("ParamValue");
-                $arrayParam['CONTENT']="@".Utils::GetPath($arrayParam['CONTENT']);
+                $arrayParam['CONTENT']=new CURLFile(Utils::GetPath($arrayParam['CONTENT']));
             }
 
             $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"HEADER\"");
             if ($this->unitTestParamVm->GetString("ParamValue") != "")
             {
                 $arrayParam['HEADER']=$this->unitTestParamVm->GetString("ParamValue");
-                $arrayParam['HEADER']="@".Utils::GetPath($arrayParam['HEADER']);
+                $arrayParam['HEADER']=new CURLFile(Utils::GetPath($arrayParam['HEADER']));
 
             }
 
@@ -234,7 +234,7 @@
             if (!Utils::IsWindows() && !is_file($path)) {
                 return new Result("", "text/plain");
             }
-            $arrayParam["DATA"]="@".$path;
+            $arrayParam["DATA"]=new CURLFile($path);
 
             return $this->httpRequest->SendRequest($this->URL, $arrayParam, "POST");
         }
@@ -322,7 +322,7 @@
             if ($this->unitTestParamVm->GetString("ParamValue") != "")
             {
                 $arrayParam['PACKAGE']=$this->unitTestParamVm->GetString("ParamValue");
-                $arrayParam['PACKAGE']="@".Utils::GetPath($arrayParam['PACKAGE']);
+                $arrayParam['PACKAGE']=new CURLFile(Utils::GetPath($arrayParam['PACKAGE']));
             }
 
             return $this->httpRequest->SendRequest($this->URL, $arrayParam, "POST");
@@ -347,14 +347,14 @@
             if ($this->unitTestParamVm->GetString("ParamValue") != "")
             {
                 $arrayParam['CONTENT']=$this->unitTestParamVm->GetString("ParamValue");
-                $arrayParam['CONTENT']="@".Utils::GetPath($arrayParam['CONTENT']);
+                $arrayParam['CONTENT']=new CURLFile(Utils::GetPath($arrayParam['CONTENT']));
             }
 
             $this->unitTestParamVm->Execute("Select ParamValue from Params WHERE ParamSet=$paramSet AND ParamName=\"HEADER\"");
             if ($this->unitTestParamVm->GetString("ParamValue") != "")
             {
                 $arrayParam['HEADER']=$this->unitTestParamVm->GetString("ParamValue");
-                $arrayParam['HEADER']="@".Utils::GetPath($arrayParam['HEADER']);
+                $arrayParam['HEADER']=new CURLFile(Utils::GetPath($arrayParam['HEADER']));
             }
 
             return $this->httpRequest->SendRequest($this->URL, $arrayParam, "POST");



More information about the mapguide-commits mailing list