[ticket/13226] Fix the usage of $rank_img

PHPBB3-13226
[ticket/13226] Add functional test for group ranks

PHPBB3-13226
Merge remote-tracking branch 'github-nicofuma/ticket/13226' into prep-release-3.1.0

* github-nicofuma/ticket/13226:
  [ticket/13226] Add functional test for group ranks
  [ticket/13226] Fix the usage of $rank_img