[ticket/12841] Add a tests for the new function

PHPBB3-12841