$this->context->
fromRequestStack($this->requestStack
);
$processor =
new AliasPathProcessor($this->aliasManager
);
$processor_manager =
new PathProcessorManager();
$processor_manager->
addOutbound($processor, 1000
);
$this->processorManager =
$processor_manager;
$this->routeProcessorManager =
$this->
getMockBuilder('Drupal\Core\RouteProcessor\RouteProcessorManager'
) ->
disableOriginalConstructor() ->
getMock();
$generator =
new UrlGenerator($this->provider,
$processor_manager,
$this->routeProcessorManager,
$this->requestStack,
['http', 'https'
]);
$generator->
setContext($this->context
);
$this->generator =
$generator;
} /**
* Return value callback for getAliasByPath() on the mock alias manager.
*
* Ensures that by default the call to getAliasByPath() will return the first
* argument that was passed in. We special-case the paths for which we wish it
* to return an actual alias.
*
* @return string
*/