Add tests for custom events and contentrules events/string substitutions