[ticket/12777] Add tests

PHPBB3-12777