[ticket/12866] Add tests

PHPBB3-12866