diff --git a/tests/src/python/test_qgsserver_wms_getfeatureinfo.py b/tests/src/python/test_qgsserver_wms_getfeatureinfo.py
index 18d2ba32c972..559185335fd9 100644
--- a/tests/src/python/test_qgsserver_wms_getfeatureinfo.py
+++ b/tests/src/python/test_qgsserver_wms_getfeatureinfo.py
@@ -445,7 +445,7 @@ def testGetFeatureInfoJSON(self):
# simple test without geometry and info_format=application/geo+json
self.wms_request_compare('GetFeatureInfo',
'&layers=testlayer%20%C3%A8%C3%A9&styles=&' +
- 'info_format=application%2Fgeo+json&transparent=true&' +
+ 'info_format=application%2Fgeo%2Bjson&transparent=true&' +
'width=600&height=400&srs=EPSG%3A3857&bbox=913190.6389747962%2C' +
'5606005.488876367%2C913235.426296057%2C5606035.347090538&' +
'query_layers=testlayer%20%C3%A8%C3%A9&X=190&Y=320',
diff --git a/tests/testdata/qgis_server/getcapabilities.txt b/tests/testdata/qgis_server/getcapabilities.txt
index 5edd3cec9f87..576df8ee5246 100644
--- a/tests/testdata/qgis_server/getcapabilities.txt
+++ b/tests/testdata/qgis_server/getcapabilities.txt
@@ -136,7 +136,30 @@ Content-Type: text/xml; charset=utf-8
default
image/png
-
+
+
+
+
+
+ landsat
+ landsat
+ CRS:84
+ EPSG:4326
+ EPSG:3857
+
+ 17.9243
+ 18.0457
+ 30.1519
+ 30.2573
+
+
+
+
@@ -160,7 +183,55 @@ Content-Type: text/xml; charset=utf-8
default
image/png
-
+
+
+
+
+
+ fields_alias
+ A test vector layer
+ A test vector layer with unicode òà
+ CRS:84
+ EPSG:4326
+ EPSG:3857
+
+ 8.20346
+ 8.20355
+ 44.9014
+ 44.9015
+
+
+
+
+
+
+ exclude_attribute
+ A test vector layer
+ A test vector layer with unicode òà
+ CRS:84
+ EPSG:4326
+ EPSG:3857
+
+ 8.20346
+ 8.20355
+ 44.9014
+ 44.9015
+
+
+
+
@@ -180,28 +251,28 @@ Content-Type: text/xml; charset=utf-8
- testlayer2
- testlayer2
- CRS:84
- EPSG:4326
- EPSG:3857
-
- 8.20346
- 8.20355
- 44.9014
- 44.9015
-
-
-
-
-
+ testlayer2
+ testlayer2
+ CRS:84
+ EPSG:4326
+ EPSG:3857
+
+ 8.20346
+ 8.20355
+ 44.9014
+ 44.9015
+
+
+
+
+
groupwithoutshortname
@@ -218,28 +289,28 @@ Content-Type: text/xml; charset=utf-8
- testlayer3
- testlayer3
- CRS:84
- EPSG:4326
- EPSG:3857
-
- 8.20346
- 8.20355
- 44.9014
- 44.9015
-
-
-
-
-
+ testlayer3
+ testlayer3
+ CRS:84
+ EPSG:4326
+ EPSG:3857
+
+ 8.20346
+ 8.20355
+ 44.9014
+ 44.9015
+
+
+
+
+
diff --git a/tests/testdata/qgis_server/getcontext.txt b/tests/testdata/qgis_server/getcontext.txt
index 154e4ecf4156..66db29d53248 100644
--- a/tests/testdata/qgis_server/getcontext.txt
+++ b/tests/testdata/qgis_server/getcontext.txt
@@ -39,6 +39,34 @@ Content-Type: text/xml; charset=utf-8
+
+ A test vector layer
+ image/png
+
+
+
+ A test vector layer with unicode òà
+
+
+
+
+
+ A test vector layer
+ image/png
+
+
+
+ A test vector layer with unicode òà
+
+
+
+
A test vector layer
image/png
@@ -53,6 +81,19 @@ Content-Type: text/xml; charset=utf-8
+
+ landsat
+ image/png
+
+
+
+
+
+
+
A Layer with a short name
image/png
@@ -68,4 +109,4 @@ Content-Type: text/xml; charset=utf-8
-
\ No newline at end of file
+
diff --git a/tests/testdata/qgis_server/getprojectsettings.txt b/tests/testdata/qgis_server/getprojectsettings.txt
index e3a097ea22e2..44d826f69453 100644
--- a/tests/testdata/qgis_server/getprojectsettings.txt
+++ b/tests/testdata/qgis_server/getprojectsettings.txt
@@ -1,4 +1,4 @@
-Content-Length: 6939
+*****
Content-Type: text/xml; charset=utf-8
@@ -168,6 +168,30 @@ Content-Type: text/xml; charset=utf-8
+
+ landsat
+ landsat
+ CRS:84
+ EPSG:4326
+ EPSG:3857
+
+ 17.9243
+ 18.0457
+ 30.1519
+ 30.2573
+
+
+
+
+ landsat
+
testlayer èé
A test vector layer
@@ -198,6 +222,65 @@ Content-Type: text/xml; charset=utf-8
+
+ fields_alias
+ A test vector layer
+ A test vector layer with unicode òà
+ CRS:84
+ EPSG:4326
+ EPSG:3857
+
+ 8.20346
+ 8.20355
+ 44.9014
+ 44.9015
+
+
+
+
+ fields_alias
+
+
+
+
+
+
+
+ exclude_attribute
+ A test vector layer
+ A test vector layer with unicode òà
+ CRS:84
+ EPSG:4326
+ EPSG:3857
+
+ 8.20346
+ 8.20355
+ 44.9014
+ 44.9015
+
+
+
+
+ exclude_attribute
+
+
+
+
+
group_name
Group title
@@ -290,6 +373,6 @@ Content-Type: text/xml; charset=utf-8
- testlayer3,testlayer2,testlayer èé,layer_with_short_name
+ testlayer3,testlayer2,exclude_attribute,fields_alias,testlayer èé,landsat,layer_with_short_name
diff --git a/tests/testdata/qgis_server/wms_getcapabilities_1_1_1.txt b/tests/testdata/qgis_server/wms_getcapabilities_1_1_1.txt
index 45f3772ac9b1..c52663bcc519 100644
--- a/tests/testdata/qgis_server/wms_getcapabilities_1_1_1.txt
+++ b/tests/testdata/qgis_server/wms_getcapabilities_1_1_1.txt
@@ -130,6 +130,24 @@ Content-Type: text/xml; charset=utf-8
+
+ landsat
+ landsat
+ CRS:84
+ EPSG:4326
+ EPSG:3857
+
+
+
+
+
testlayer èé
A test vector layer
@@ -149,6 +167,44 @@ Content-Type: text/xml; charset=utf-8
+
+ fields_alias
+ A test vector layer
+ A test vector layer with unicode òà
+ CRS:84
+ EPSG:4326
+ EPSG:3857
+
+
+
+
+
+
+ exclude_attribute
+ A test vector layer
+ A test vector layer with unicode òà
+ CRS:84
+ EPSG:4326
+ EPSG:3857
+
+
+
+
+
group_name
Group title
diff --git a/tests/testdata/qgis_server/wms_getcapabilities_1_3_0.txt b/tests/testdata/qgis_server/wms_getcapabilities_1_3_0.txt
index 5edd3cec9f87..576df8ee5246 100644
--- a/tests/testdata/qgis_server/wms_getcapabilities_1_3_0.txt
+++ b/tests/testdata/qgis_server/wms_getcapabilities_1_3_0.txt
@@ -136,7 +136,30 @@ Content-Type: text/xml; charset=utf-8
default
image/png
-
+
+
+
+
+
+ landsat
+ landsat
+ CRS:84
+ EPSG:4326
+ EPSG:3857
+
+ 17.9243
+ 18.0457
+ 30.1519
+ 30.2573
+
+
+
+
@@ -160,7 +183,55 @@ Content-Type: text/xml; charset=utf-8
default
image/png
-
+
+
+
+
+
+ fields_alias
+ A test vector layer
+ A test vector layer with unicode òà
+ CRS:84
+ EPSG:4326
+ EPSG:3857
+
+ 8.20346
+ 8.20355
+ 44.9014
+ 44.9015
+
+
+
+
+
+
+ exclude_attribute
+ A test vector layer
+ A test vector layer with unicode òà
+ CRS:84
+ EPSG:4326
+ EPSG:3857
+
+ 8.20346
+ 8.20355
+ 44.9014
+ 44.9015
+
+
+
+
@@ -180,28 +251,28 @@ Content-Type: text/xml; charset=utf-8
- testlayer2
- testlayer2
- CRS:84
- EPSG:4326
- EPSG:3857
-
- 8.20346
- 8.20355
- 44.9014
- 44.9015
-
-
-
-
-
+ testlayer2
+ testlayer2
+ CRS:84
+ EPSG:4326
+ EPSG:3857
+
+ 8.20346
+ 8.20355
+ 44.9014
+ 44.9015
+
+
+
+
+
groupwithoutshortname
@@ -218,28 +289,28 @@ Content-Type: text/xml; charset=utf-8
- testlayer3
- testlayer3
- CRS:84
- EPSG:4326
- EPSG:3857
-
- 8.20346
- 8.20355
- 44.9014
- 44.9015
-
-
-
-
-
+ testlayer3
+ testlayer3
+ CRS:84
+ EPSG:4326
+ EPSG:3857
+
+ 8.20346
+ 8.20355
+ 44.9014
+ 44.9015
+
+
+
+
+
diff --git a/tests/testdata/qgis_server/wms_getfeatureinfo_json.txt b/tests/testdata/qgis_server/wms_getfeatureinfo_json.txt
index 957884181fd9..3e38c8566fa0 100644
--- a/tests/testdata/qgis_server/wms_getfeatureinfo_json.txt
+++ b/tests/testdata/qgis_server/wms_getfeatureinfo_json.txt
@@ -1,7 +1,8 @@
*****
Content-Type: application/json; charset=utf-8
-{"layers":[{
+{
+"layers":[{
"name": "testlayer èé",
"type": "FeatureCollection",
"features":[