@@ -260,6 +260,38 @@ def test_wms_getLegendGraphics_rulelabel(self):
260
260
r , h = self ._result (self ._execute_request (qs ))
261
261
self ._img_diff_error (r , h , "WMS_GetLegendGraphic_rulelabel_true" , 250 , QSize (15 , 15 ))
262
262
263
+ # LAYERTITLE false and no set of RULELABEL means it is false for single symbol
264
+ parms = {
265
+ 'MAP' : self .testdata_path + "test_project.qgs" ,
266
+ 'SERVICE' : 'WMS' ,
267
+ 'VERSION' : '1.3.0' ,
268
+ 'REQUEST' : 'GetLegendGraphic' ,
269
+ 'FORMAT' : 'image/png' ,
270
+ 'LAYER' : u'testlayer%20èé' ,
271
+ 'LAYERTITLE' : 'FALSE'
272
+ }
273
+ qs = '?' + '&' .join ([u"%s=%s" % (k , v ) for k , v in parms .items ()])
274
+ r , h = self ._result (self ._execute_request (qs ))
275
+ self ._img_diff_error (r , h , "WMS_GetLegendGraphic_rulelabel_notset0" , 250 , QSize (15 , 15 ))
276
+
277
+ # LAYERTITLE false and no set of RULELABEL means it is true for legend other than single symbol
278
+ parms = {
279
+ 'MAP' : self .testdata_path + "test_project_legend_rule.qgs" ,
280
+ 'SERVICE' : 'WMS' ,
281
+ 'VERSION' : '1.3.0' ,
282
+ 'REQUEST' : 'GetLegendGraphic' ,
283
+ 'FORMAT' : 'image/png' ,
284
+ 'LAYER' : u'testlayer%20èé' ,
285
+ 'ITEMFONTBOLD' : 'TRUE' ,
286
+ 'ITEMFONTSIZE' : '20' ,
287
+ 'LAYERFONTFAMILY' : self .fontFamily ,
288
+ 'ITEMFONTFAMILY' : self .fontFamily ,
289
+ 'LAYERTITLE' : 'FALSE'
290
+ }
291
+ qs = '?' + '&' .join ([u"%s=%s" % (k , v ) for k , v in parms .items ()])
292
+ r , h = self ._result (self ._execute_request (qs ))
293
+ self ._img_diff_error (r , h , "WMS_GetLegendGraphic_rulelabel_notset1" , 250 , QSize (15 , 15 ))
294
+
263
295
def test_wms_getLegendGraphics_rule (self ):
264
296
"""Test that does not return an exception but an image"""
265
297
parms = {
0 commit comments