OpenLayers.Protocol.WFS misses a setGeometryName method, p=fvanderbiest, r=me,erilem (closes #3037)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11670 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
bartvde
2011-03-08 15:21:14 +00:00
parent dfd80545ca
commit 288641e00d
2 changed files with 29 additions and 0 deletions

View File

@@ -24,6 +24,23 @@
"initialize returns instance of custom versioned protocol")
}
function test_setGeometryName(t) {
t.plan(4);
var protocol = new OpenLayers.Protocol.WFS({
url: "http://some.url.org",
featureNS: "http://namespace.org",
featureType: "type",
geometryName: "geom"
});
t.eq(protocol.geometryName, "geom", "geometryName set correctly by constructor");
t.eq(protocol.format.geometryName, "geom", "geometryName correctly set on format by constructor");
// change the geometryName on the fly
protocol.setGeometryName("SHAPE");
t.eq(protocol.geometryName, "SHAPE", "geometryName changed correctly by setGeometryName");
t.eq(protocol.format.geometryName, "SHAPE", "geometryName correctly changed on format by setGeometryName");
protocol.destroy();
}
function test_setFeatureType(t) {
t.plan(4);
var protocol = new OpenLayers.Protocol.WFS({