[BUGFIX release] fixes variable argument passing to triggerEvent helper

triggerEvent takes an optional third argument, but were weren't properly
resetting argument names if you didn't pass the third argument.

Passing a scope to triggerEvent was also untested.
Merge pull request #5165 from trek/fix-argument-truncation-of-triggerEvent-test-helper

[BUGFIX release] fixes variable argument passing to triggerEvent helper