Add tests for custom events and contentrules events/string substitutions

Tests for my previous code.