[ticket/12890] Fix unit tests to incorporate DB

PHPBB3-12890