diff options
author | Chris Schlaeger <chris@linux.com> | 2014-08-12 21:56:44 +0200 |
---|---|---|
committer | Chris Schlaeger <chris@linux.com> | 2014-08-12 21:56:44 +0200 |
commit | ea346a785dc1b3f7c156f6fc33da634e1f1a627b (patch) | |
tree | af67530553d20b6e82ad60fd79593e9c4abf5565 /misc/openlayers/tests/Format/WFSCapabilities.html | |
parent | 59741cd535c47f25971bf8c32b25da25ceadc6d5 (diff) | |
download | postrunner-ea346a785dc1b3f7c156f6fc33da634e1f1a627b.zip |
Adding jquery, flot and openlayers to be included with the GEM.v0.0.4
Diffstat (limited to 'misc/openlayers/tests/Format/WFSCapabilities.html')
-rw-r--r-- | misc/openlayers/tests/Format/WFSCapabilities.html | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/misc/openlayers/tests/Format/WFSCapabilities.html b/misc/openlayers/tests/Format/WFSCapabilities.html new file mode 100644 index 0000000..fc2ff2d --- /dev/null +++ b/misc/openlayers/tests/Format/WFSCapabilities.html @@ -0,0 +1,43 @@ +<html> +<head> + <script src="../OLLoader.js"></script> + <script type="text/javascript"> + + function test_read(t) { + t.plan(4); + + var _v1_0_0 = OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read; + var _v1_1_0 = OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read; + + var parser = new OpenLayers.Format.WFSCapabilities(); + + // version 1.0.0 + var text = + '<?xml version="1.0" encoding="UTF-8"?>' + + '<wfs:WFS_Capabilities version="1.0.0" xmlns:wfs="http://www.opengis.net/wfs"></wfs:WFS_Capabilities>'; + OpenLayers.Format.WFSCapabilities.v1_0_0.prototype.read = function() { + t.ok(true, "Version 1.0.0 detected"); + return {}; + } + var res = parser.read(text); + t.eq(res.version, "1.0.0", "version 1.0.0 written to result object"); + OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read = _v1_1_0; + + // version 1.1.0 + var text = + '<?xml version="1.0" encoding="UTF-8"?>' + + '<wfs:WFS_Capabilities version="1.1.0" xmlns:wfs="http://www.opengis.net/wfs"></wfs:WFS_Capabilities>'; + OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read = function() { + t.ok(true, "Version 1.1.0 detected"); + return {}; + } + var res = parser.read(text); + t.eq(res.version, "1.1.0", "version 1.1.0 written to result object"); + OpenLayers.Format.WFSCapabilities.v1_1_0.prototype.read = _v1_1_0; + } + + </script> +</head> +<body> +</body> +</html> |