[ticket/11482] Unit tests for advanced DEFINE

Unit tests for advanced DEFINE and ENDDEFINE

PHPBB3-11482