Merge branch 'hotfix/travis-exit-codes'

Fixes build script to properly report both test and CS failures.
[#3650] Do not re-inject EM instance

- If the controller already composes an EM instance, do not re-inject
  it. This allows factories to inject an EM instance and attach
  listeners.
[#3650] Fix failing test

- Override getEventManager() in test asset so that we can test
  injection, as parent was lazy initializing an EM instance.