Fix v8/dev merge

This commit is contained in:
Stephan
2019-05-29 15:13:28 +02:00
parent 8579b5a89b
commit c451498975
2 changed files with 2 additions and 2 deletions

View File

@@ -99,7 +99,7 @@ namespace Umbraco.Tests.Web
var snapshotService = Mock.Of<IPublishedSnapshotService>();
Mock.Get(snapshotService).Setup(x => x.CreatePublishedSnapshot(It.IsAny<string>())).Returns(snapshot);
var media = Mock.Of<IPublishedContent>();
Mock.Get(media).Setup(x => x.Url).Returns("/media/1001/my-image.jpg");
Mock.Get(media).Setup(x => x.Url(It.IsAny<string>(), It.IsAny<UrlMode>())).Returns("/media/1001/my-image.jpg");
var mediaCache = Mock.Of<IPublishedMediaCache>();
Mock.Get(mediaCache).Setup(x => x.GetById(It.IsAny<Guid>())).Returns(media);

View File

@@ -60,7 +60,7 @@ namespace Umbraco.Web.Templates
if (guidUdi.EntityType == Constants.UdiEntityType.Document)
newLink = urlProvider.GetUrl(guidUdi.Guid);
else if (guidUdi.EntityType == Constants.UdiEntityType.Media)
newLink = mediaCache.GetById(guidUdi.Guid)?.Url;
newLink = mediaCache.GetById(guidUdi.Guid)?.Url();
if (newLink == null)
newLink = "#";