[ticket/11872] Fixes for template validator

Missing new line at the end of validator
Use data provider for unit tests

PHPBB3-11872