When testing you can mock a controller that has been registered with `angular.module(...).controller('MyCtrl')` by using `$controllerProvider.register('MyCtrl')`. 

But how can I mock an inline controller on a directive?

```
function MyCtrl() {

}

function MyDir() {
    return {
        restrict: 'E',
        controllerAs: 'myCtrl',
        controller: MyCtrl,
        template: '<div>hi</div>',
    };
}

```