[ticket/12812] Remove unused global $db from tests

PHPBB3-12812