[ticket/12370] Add unit tests for topic notifications

PHPBB3-12370