diff --git a/tests/src/python/test_qgsserver_wms_getfeatureinfo.py b/tests/src/python/test_qgsserver_wms_getfeatureinfo.py
index 85cdd88022d..3d7ed85feb3 100644
--- a/tests/src/python/test_qgsserver_wms_getfeatureinfo.py
+++ b/tests/src/python/test_qgsserver_wms_getfeatureinfo.py
@@ -213,6 +213,15 @@ class TestQgsServerWMSGetFeatureInfo(TestQgsServerWMSTestBase):
'wms_getfeatureinfo-values0-text-xml',
'test_project_values.qgz')
+ # Test GetFeatureInfo on raster layer
+ self.wms_request_compare('GetFeatureInfo',
+ '&layers=landsat&styles=&' +
+ 'info_format=text%2Fxml&transparent=true&' +
+ 'width=500&height=500&srs=EPSG%3A3857&' +
+ 'bbox=1989139.6,3522745.0,2015014.9,3537004.5&' +
+ 'query_layers=landsat&X=250&Y=250',
+ 'wms_getfeatureinfo-raster-text-xml')
+
def testGetFeatureInfoValueRelation(self):
"""Test GetFeatureInfo resolves "value relation" widget values. regression 18518"""
mypath = self.testdata_path + "test_project_values.qgz"
diff --git a/tests/testdata/qgis_server/test_project.qgs b/tests/testdata/qgis_server/test_project.qgs
index 14332ac312a..15cc7143e99 100644
--- a/tests/testdata/qgis_server/test_project.qgs
+++ b/tests/testdata/qgis_server/test_project.qgs
@@ -22,6 +22,9 @@
+
+
+
@@ -54,6 +57,7 @@
- testlayer_2b89ed65_ef2f_4897_af15_9b32d4c4e040
- testlayer_èé_cf86cf11_222f_4b62_929c_12cfc82b9774
- testlayer_èé_2_a5f61891_b949_43e3_ad30_84013fc922de
+ - landsat_a7d15b35_ca83_4b23_a9fb_af3fbdd60d15
@@ -70,10 +74,10 @@
degrees
- 8.20313020806923632
- 44.90118727027074641
- 8.20717330488028196
- 44.90224039332306205
+ 17.92123882869385909
+ 30.1492204088525888
+ 18.0486921925404431
+ 30.25992437587047235
0
@@ -97,6 +101,11 @@
+
+
+
+
+
@@ -128,7 +137,191 @@
+
+ degrees
+
+ 0
+ 0
+ 0
+ 0
+
+ 0
+
+
+ +proj=longlat +datum=WGS84 +no_defs
+ 3452
+ 4326
+ EPSG:4326
+ WGS 84
+ longlat
+ WGS84
+ true
+
+
+ 0
+
+
+ degrees
+
+ 0
+ 0
+ 0
+ 0
+
+ 0
+
+
+ +proj=longlat +datum=WGS84 +no_defs
+ 3452
+ 4326
+ EPSG:4326
+ WGS 84
+ longlat
+ WGS84
+ true
+
+
+ 0
+
+
+ degrees
+
+ 0
+ 0
+ 0
+ 0
+
+ 0
+
+
+ +proj=longlat +datum=WGS84 +no_defs
+ 3452
+ 4326
+ EPSG:4326
+ WGS 84
+ longlat
+ WGS84
+ true
+
+
+ 0
+
+
+
+ 781662.375
+ 3339523.125
+ 793062.375
+ 3350923.125
+
+ landsat_a7d15b35_ca83_4b23_a9fb_af3fbdd60d15
+ ../landsat.tif
+
+
+
+ landsat
+
+
+ +proj=utm +zone=33 +datum=WGS84 +units=m +no_defs
+ 3117
+ 32633
+ EPSG:32633
+ WGS 84 / UTM zone 33N
+ utm
+ WGS84
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 0
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+ gdal
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+ MinMax
+ WholeRaster
+ Estimated
+ 0.02
+ 0.98
+ 2
+
+
+ 122
+ 130
+ StretchToMinimumMaximum
+
+
+
+
+
+
+ 0
+
8.20345930703634352
@@ -1540,6 +1733,7 @@ def my_form_open(dialog, layer, feature):
+
None