[ticket/11482] Unit tests for DEFINE

Unit tests for advanced DEFINE and ENDDEFINE

PHPBB3-11482