$componentController test helper has different DI results. #15038
Description
Note: for support questions, please use one of these channels: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#question. This repository's issues are reserved for feature requests and bug reports.
Do you want to request a feature or report a bug?
I am reporting a bug.
What is the current behavior?
When using a component in angular 1.5.8 I am able to inject $element into the component controller. It works fine running in the browser. But when used in testing the $componentController's DI errors with unknown provider $elementProvider.
What is the expected behavior?
I Expect it to work in test or in the app.
What is the motivation / use case for changing the behavior?
The behavior is inconsistent.
Which versions of Angular, and which browser / OS are affected by this issue? Did this work in previous versions of Angular? Please also test with the latest stable and snapshot (https://code.angularjs.org/snapshot/) versions.
1.5.8
Chrome