Pass Controller:$components config to mocked components

Otherwise there can be significant differences in behavior between using
an unmodifiedcomponent in testAction and using a mock as the config will not be
propogated from the controller
phpcs fixes

and correct one test in the fragile situation of using a heredoc with
trailing whitespace