[ticket/11224] Revert Revert "Merge pull request #2460 from ticket/11224"

This reverts commit 40cd7570e6f4da7cc60d83a3e99c72a2fb99e3f7.
[ticket/11224] Updates tests

PHPBB3-11224