public function testCreateGlobalUrlAliasForLocation()
{
$repositoryMock = $this->getRepositoryMock();
$mockedService = $this->getPartlyMockedURLAliasServiceService(array('createUrlAlias'));
$location = $this->getLocationStub();
$locationServiceMock = $this->getMock('eZ\\Publish\\Core\\Repository\\LocationService', array(), array(), '', false);
$locationServiceMock->expects($this->exactly(2))->method('loadLocation')->with($this->equalTo(42))->will($this->returnValue($location));
$repositoryMock->expects($this->exactly(2))->method('getLocationService')->will($this->returnValue($locationServiceMock));
$mockedService->expects($this->exactly(2))->method('createUrlAlias')->with($this->equalTo($location), $this->equalTo('path'), $this->equalTo('languageCode'), $this->equalTo('forwarding'), $this->equalTo('alwaysAvailable'));
$mockedService->createGlobalUrlAlias('eznode:42', 'path', 'languageCode', 'forwarding', 'alwaysAvailable');
$mockedService->createGlobalUrlAlias('module:content/view/full/42', 'path', 'languageCode', 'forwarding', 'alwaysAvailable');
}